This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6045cb89e5e8: Use an allow list on reserved macro
identifiers (authored by serge-sans-paille).
Herald added a project: clang.
Repository:
rG LLVM
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102168/new/
https://reviews.llvm.org/D102168
___
cfe-commits mailing lis
serge-sans-paille updated this revision to Diff 344840.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102168/new/
https://reviews.llvm.org/D102168
Files:
clang/lib/Lex/PPDirectives.cpp
clang/test/Preprocessor/macro-reserved.c
Index: clang/test/Preprocessor/macro-reserved.c
serge-sans-paille updated this revision to Diff 344825.
serge-sans-paille added a comment.
Minor nits as suggested by reviewers + extend the list.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102168/new/
https://reviews.llvm.org/D102168
Files:
clang/lib/Lex/PPDirectives.cpp
clang/
aaron.ballman added inline comments.
Comment at: clang/lib/Lex/PPDirectives.cpp:125
+ if (II->isReserved(Lang) != ReservedIdentifierStatus::NotReserved) {
+static constexpr std::array ReservedMacro = {
+"_ATFILE_SOURCE", "_BSD_SOURCE","_FILE_OFFSET_BITS",
-
aaron.ballman added a comment.
Some additional ones to allow from MSDN: `_CRT_SECURE_NO_WARNINGS`,
`_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES`, `_CRT_NONSTDC_NO_WARNINGS`,
(https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160).
Comm
aaron.ballman added a subscriber: cfe-commits.
aaron.ballman added a comment.
Adding cfe-commits.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102168/new/
https://reviews.llvm.org/D102168
___
cfe-commits mailing list
cfe-commits@lists.llvm.o