[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 5 06:17:05 PST 2024
================
@@ -153,12 +153,35 @@ std::string AttributeCommonInfo::getNormalizedFullName() const {
normalizeName(getAttrName(), getScopeName(), getSyntax()));
}
+const std::map<StringRef, AttributeCommonInfo::Scope> ScopeMap = {
+ {"", AttributeCommonInfo::SC_NONE},
+ {"clang", AttributeCommonInfo::SC_CLANG},
+ {"gnu", AttributeCommonInfo::SC_GNU},
+ {"msvc", AttributeCommonInfo::SC_MSVC},
+ {"omp", AttributeCommonInfo::SC_OMP},
+ {"hlsl", AttributeCommonInfo::SC_HLSL},
+ {"gsl", AttributeCommonInfo::SC_GSL},
+ {"riscv", AttributeCommonInfo::SC_RISCV}};
+
+AttributeCommonInfo::Scope
+getScopeFromNormalizedScopeName(const StringRef ScopeName) {
----------------
erichkeane wrote:
```suggestion
getScopeFromNormalizedScopeName(StringRef ScopeName) {
```
https://github.com/llvm/llvm-project/pull/114899
More information about the cfe-commits
mailing list