[clang] [clang][docs] assert.h is not a good candidate for a textual header (PR #165057)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 30 10:49:15 PDT 2025
https://github.com/zygoloid approved this pull request.
We had a really productive discussion about this (and other modules stuff) at the dev meeting. For me the most relevant takeaways were:
* `config_macros` should be transitive -- if module A has a config macro, and B imports A, then that config macro is a config macro for B too.
* With transitive `config_macro` checking, it would be reasonable for an implementation to choose to make `<assert.h>` a modular header, and to not support in-file setting of `NDEBUG`.
And with that in mind, it seems like we shouldn't be taking a stance on whether `<assert.h>` is treated as a modular header by a particular implementation (eg, by the libc or SDK's module map).
So yeah, I agree that the best path forward is to just not mention assert.h in our documentation at all. Thanks for your patience here!
https://github.com/llvm/llvm-project/pull/165057
More information about the cfe-commits
mailing list