diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2025-05-28 06:41:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-28 06:41:01 -0400 |
commit | 5ab944a8c6a213beb96f3747a441b02e497732e4 (patch) | |
tree | de76ae9755b92de2136cc350c876f57405433d27 /clang/lib/Lex/ModuleMap.cpp | |
parent | 0291f495dbea64231212a8d51ecef653e10aed33 (diff) | |
download | llvm-5ab944a8c6a213beb96f3747a441b02e497732e4.zip llvm-5ab944a8c6a213beb96f3747a441b02e497732e4.tar.gz llvm-5ab944a8c6a213beb96f3747a441b02e497732e4.tar.bz2 |
[C2y] Add stdcountof.h (#140890)
WG14 N3469 changed _Lengthof to _Countof but it also introduced the
<stdcountof.h> header to expose a macro with a non-ugly identifier. GCC
vends this header as part of the compiler implementation, so Clang
should do the same.
Suggested-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r-- | clang/lib/Lex/ModuleMap.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index c088e4e..637a08f 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -258,6 +258,7 @@ static bool isBuiltinHeaderName(StringRef FileName) { .Case("stdarg.h", true) .Case("stdatomic.h", true) .Case("stdbool.h", true) + .Case("stdcountof.h", true) .Case("stddef.h", true) .Case("stdint.h", true) .Case("tgmath.h", true) |