[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 06:28:44 PST 2025
================
@@ -166,7 +166,8 @@ getScopeFromNormalizedScopeName(StringRef ScopeName) {
.Case("hlsl", AttributeCommonInfo::Scope::HLSL)
.Case("msvc", AttributeCommonInfo::Scope::MSVC)
.Case("omp", AttributeCommonInfo::Scope::OMP)
- .Case("riscv", AttributeCommonInfo::Scope::RISCV);
+ .Case("riscv", AttributeCommonInfo::Scope::RISCV)
+ .Default(AttributeCommonInfo::Scope::NONE);
----------------
AaronBallman wrote:
Won't it be surprising that `""` and `"wobble"` will both come back as `NONE`? I would have expected the latter to return something like "Unknown" so it's distinguished from no scope name.
https://github.com/llvm/llvm-project/pull/120925
More information about the cfe-commits
mailing list