[clang] [Clang] add typo correction for unknown attribute names (PR #140629)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Tue May 20 11:07:02 PDT 2025


================
@@ -203,10 +221,47 @@ unsigned AttributeCommonInfo::calculateAttributeSpellingListIndex() const {
   // attribute spell list index matching code.
   auto Syntax = static_cast<AttributeCommonInfo::Syntax>(getSyntax());
   StringRef ScopeName = normalizeAttrScopeName(getScopeName(), Syntax);
-  StringRef Name = normalizeAttrName(getAttrName(), ScopeName, Syntax);
-
+  StringRef Name =
+      normalizeAttrName(getAttrName()->getName(), ScopeName, Syntax);
   AttributeCommonInfo::Scope ComputedScope =
       getScopeFromNormalizedScopeName(ScopeName);
 
 #include "clang/Sema/AttrSpellingListIndex.inc"
 }
+
+#include "clang/Basic/AttributeSpellingList.inc"
----------------
a-tarasyuk wrote:

Thanks for the feedback. I've changed to use _general approach_

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


More information about the cfe-commits mailing list