================
@@ -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"
----------------
AaronBallman wrote:
It's hard to understand what's going on here because the tablegen hides the
fact that this is introducing new declarations. I think a more general approach
would be:
```
#define NAME(X) X
static constexpr const char *AttrSpellingList[] = {
#include "clang/Basic/AttributeSpellingList.inc"
};
#undef NAME
#define SCOPE(X) X
static constexpr const char *AttrScopeSpellingList[] = {
#include "clang/Basic/AttributeSpellingList.inc"
};
#undef SCOPE
```
WDYT?
https://github.com/llvm/llvm-project/pull/140629
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits