[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 04:52:39 PDT 2024


================
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr,
   return false;
 }
 
+static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) {
----------------
AaronBallman wrote:

They don't support it: https://godbolt.org/z/9dxshKxj9

> Especially if that rule has been standardized by C.

Yeah, I should probably write a paper for WG21 proposing this.

https://github.com/llvm/llvm-project/pull/106036


More information about the cfe-commits mailing list