[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)
Ian Anderson via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 19 21:08:42 PDT 2024
================
@@ -49,7 +48,25 @@
#define __need_rsize_t
#endif
#define __need_wchar_t
+#if !defined(__STDDEF_H) && !__building_module(_Builtin_stddef)
----------------
ian-twilightcoder wrote:
We do still need everything when we're building with modules for the reasons outlined in the comment, but I think you're right that `__building_module(_Builtin_stddef)` doesn't do anything and that needs to be `__has_feature(modules)`
https://github.com/llvm/llvm-project/pull/99727
More information about the cfe-commits
mailing list