================
@@ -6469,9 +6469,22 @@ bool Sema::diagnoseQualifiedDeclaration(CXXScopeSpec
&SS, DeclContext *DC,
// The cases that DC is not NamespaceDecl should be handled in
// CheckRedeclarationExported.
return false;
- } else
+ } else {
+ unsigned DCKind = diag::EnclosingDeclKind::Namespace;
----------------
zwuis wrote:
I think IILE is slightly better.
```cpp
unsigned DCKind = [&]{
if (auto *TD = dyn_cast<TagDecl>(DC)) {
switch (TD->getTagKind()) { ... }
}
assert(isa<NamespaceDecl>(DC));
return ...;
}();
```
https://github.com/llvm/llvm-project/pull/230630
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits