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

> Because we don't support any non-standard attributes without a vendor 
> namespace (e.g., we don't support `[[foo]]` as an extension, it needs to have 
> some sort of prefix like `[[gnu::foo]]` or `[[clang::foo]]`), I was thinking 
> we could rely on that.
> 
> However, it might also make sense to just add a bit to the `Spelling` in 
> `Attr.td` to say "this is a standard spelling for the attribute" (which 
> side-steps things like `nodiscard` vs `warn_unused_result`)?

Ah, yeah, we could just check if it has a non-namespaced standard spelling, 
thats probably more than enough.  An additional bit isn't really necessary at 
that point (since we effectively already have it).


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