================
@@ -314,64 +314,92 @@ void Parser::ParseGNUAttributes(ParsedAttributes &Attrs,
 }
 
 /// Determine whether the given attribute has an identifier argument.
-static bool attributeHasIdentifierArg(const IdentifierInfo &II) {
+static bool attributeHasIdentifierArg(const IdentifierInfo &II,
+                                      ParsedAttr::Syntax Syntax,
+                                      IdentifierInfo *ScopeName) {
+  std::string FullName = AttributeCommonInfo::getNormalizedFullNameWithSyntax(
+      &II, ScopeName, Syntax);
 #define CLANG_ATTR_IDENTIFIER_ARG_LIST
-  return llvm::StringSwitch<bool>(normalizeAttrName(II.getName()))
+  return llvm::StringSwitch<bool>(FullName)
----------------
mikerice1969 wrote:

> Can we remove `normalizeAttrName` since this looks like it replaces all of 
> the uses?

There are still two uses of this function. I didn't change the tablegen for the 
'LateParsed' uses (CLANG_ATTR_LATE_PARSED_EXPERIMENTAL_EXT_LIST and 
CLANG_ATTR_LATE_PARSED_LIST) since these only use the GNU syntax so there isn't 
a problem just using the attribute name. 

We could add "GNU::" to the tablegen for these and then use the new function. 
Or leave it alone. I don't have a strong preference.

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

Reply via email to