[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
Mon Oct 27 14:59:17 PDT 2025
================
@@ -421,13 +421,7 @@ As an example, the module map file for the C standard library might look a bit l
.. parsed-literal::
- module std [system] [extern_c] {
----------------
zygoloid wrote:
Hm.
It's definitely flawed in that it's viral and requires strong layering between your C headers and your C++ headers, but if you have proper layering, if your C library isn't including C++ headers, and if you can add the attribute to your C library and its transitive dependencies, it can work well. Not everyone has a setup where the C library includes C++ headers rather than being layered entirely beneath the C++ library.
But you make a good point that it's got enough problems that making a blanket recommendation to use it would be unreasonable. Yeah, I'm convinced we shouldn't be using it in this example.
https://github.com/llvm/llvm-project/pull/165057
More information about the cfe-commits
mailing list