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

I was going to say we should be handling this at the `AttributeCommonInfo` 
level... but oh boy.

https://github.com/llvm/llvm-project/blob/a919588df4f108cef5829363a9ec6a1968dbb03a/clang/include/clang/Basic/AttributeCommonInfo.h#L64

That's a layering violation! We should move `AttrParsedAttrList` from Sema to 
Basic. But we should be able to use `isStandardAttributeSyntax()` in 
combination with the parsed attribute kind to determine whether the attribute 
is reserved or not (which would be a new .inc file generated by tablegen) that 
should amount to a simple switch saying "this attribute kind could be a 
standard attribute", coupled with a call to check the syntax used.

https://github.com/llvm/llvm-project/pull/106036
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to