================
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
 
 void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
   std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+  SourceRange NR = AL.getNormalizedRange();
----------------
erichkeane wrote:

There are a few uses of this function, I wonder if we switched it to returning 
`bool` and taking by reference (instead of const-reference) if making this 
always return 'true' (such that the cases followed immediately by 'return true' 
could just return), AND having it set the Attribute as invalid would be 
valuable.

ALSO-ALSO: Could we change this to take `AttributeCommonInfo` instead?  Or is 
there something that we need the full `ParsedAttr` for?

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

Reply via email to