[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 6 10:06:19 PDT 2024
================
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) {
cast<FunctionDecl>(D)->isFunctionTemplateSpecialization())
return;
+ if (isa<UsingEnumDecl>(D) && D->getDeclName().isEmpty()) {
----------------
zygoloid wrote:
Why do we push a `UsingEnumDecl` into the scope at all? Would it make sense for the caller to just add the declaration to the `DeclContext` instead of calling `PushOnScopeChains`?
https://github.com/llvm/llvm-project/pull/87144
More information about the cfe-commits
mailing list