[PATCH] D106732: Support macro deprecation #pragma clang deprecated
Chris Bieneman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 28 13:49:59 PDT 2021
beanz updated this revision to Diff 362528.
beanz added a comment.
Covered taken #elif* directives per @aaron.ballmon's feedback.
Handling non-taken #elif directives is non-trivial because clang skips parsing the conditionals for non-taken directives. At present clang won't even error on malformed #elif directives if an earlier branch is taken.
Also with this update I refactored the error emitting code out to a function on the Preprocessor, since it is just getting copy and pasted over and over again, and this change would have added another copy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106732/new/
https://reviews.llvm.org/D106732
Files:
clang/docs/LanguageExtensions.rst
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/include/clang/Basic/IdentifierTable.h
clang/include/clang/Lex/Preprocessor.h
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPExpressions.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/Pragma.cpp
clang/lib/Lex/Preprocessor.cpp
clang/test/Lexer/deprecate-macro.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106732.362528.patch
Type: text/x-patch
Size: 12657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210728/6e380e0a/attachment-0001.bin>
More information about the cfe-commits
mailing list