[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)
Jonathan Wakely via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 12:18:41 PDT 2024
================
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr,
return false;
}
+static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) {
----------------
jwakely wrote:
Shouldn't the library use `[[__deprecated__]]` and `[[clang::__foo__]]` so that users can define the names `deprecated` and `foo` as macros (which is allowed in a conforming C++11 program) and the library still works?
https://github.com/llvm/llvm-project/pull/106036
More information about the cfe-commits
mailing list