[all-commits] [llvm/llvm-project] 26c695: Support macro deprecation #pragma clang deprecated
thegreatbeanz via All-commits
all-commits at lists.llvm.org
Thu Jul 29 10:41:26 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 26c695b7893071d5e69afbaa70c4850ab2e468be
https://github.com/llvm/llvm-project/commit/26c695b7893071d5e69afbaa70c4850ab2e468be
Author: Chris Bieneman <chris.bieneman at me.com>
Date: 2021-07-29 (Thu, 29 Jul 2021)
Changed paths:
M clang/docs/LanguageExtensions.rst
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticLexKinds.td
M clang/include/clang/Basic/IdentifierTable.h
M clang/include/clang/Lex/Preprocessor.h
M clang/lib/Lex/PPDirectives.cpp
M clang/lib/Lex/PPExpressions.cpp
M clang/lib/Lex/PPMacroExpansion.cpp
M clang/lib/Lex/Pragma.cpp
M clang/lib/Lex/Preprocessor.cpp
A clang/test/Lexer/deprecate-macro.c
Log Message:
-----------
Support macro deprecation #pragma clang deprecated
This patch adds `#pragma clang deprecated` to enable deprecation of
preprocessor macros.
The macro must be defined before `#pragma clang deprecated`. When
deprecating a macro a custom message may be optionally provided.
Warnings are emitted at the use site of a deprecated macro, and can be
controlled via the `-Wdeprecated` warning group.
This patch takes some rough inspiration and a few lines of code from
https://reviews.llvm.org/D67935.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D106732
More information about the All-commits
mailing list