@@ -158,21 +158,15 @@ std::string AttributeCommonInfo::getNormalizedFullName() const {
158158
159159AttributeCommonInfo::Scope
160160getScopeFromNormalizedScopeName (StringRef ScopeName) {
161- AttributeCommonInfo::Scope ParsedScope =
162- llvm::StringSwitch<AttributeCommonInfo::Scope>(ScopeName)
163- .Case (" " , AttributeCommonInfo::Scope::NONE)
164- .Case (" clang" , AttributeCommonInfo::Scope::CLANG)
165- .Case (" gnu" , AttributeCommonInfo::Scope::GNU)
166- .Case (" gsl" , AttributeCommonInfo::Scope::GSL)
167- .Case (" hlsl" , AttributeCommonInfo::Scope::HLSL)
168- .Case (" msvc" , AttributeCommonInfo::Scope::MSVC)
169- .Case (" omp" , AttributeCommonInfo::Scope::OMP)
170- .Case (" riscv" , AttributeCommonInfo::Scope::RISCV)
171- .Default (AttributeCommonInfo::Scope::INVALID);
172-
173- assert (ParsedScope != AttributeCommonInfo::Scope::INVALID);
174-
175- return ParsedScope;
161+ return llvm::StringSwitch<AttributeCommonInfo::Scope>(ScopeName)
162+ .Case (" " , AttributeCommonInfo::Scope::NONE)
163+ .Case (" clang" , AttributeCommonInfo::Scope::CLANG)
164+ .Case (" gnu" , AttributeCommonInfo::Scope::GNU)
165+ .Case (" gsl" , AttributeCommonInfo::Scope::GSL)
166+ .Case (" hlsl" , AttributeCommonInfo::Scope::HLSL)
167+ .Case (" msvc" , AttributeCommonInfo::Scope::MSVC)
168+ .Case (" omp" , AttributeCommonInfo::Scope::OMP)
169+ .Case (" riscv" , AttributeCommonInfo::Scope::RISCV);
176170}
177171
178172unsigned AttributeCommonInfo::calculateAttributeSpellingListIndex () const {
0 commit comments