[clang] [clang-repl] Undo the enumerators of an unscoped enumeration (PR #228370)
Jonas Rembser via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 7 02:41:34 PST 2026
================
@@ -291,6 +291,12 @@ class ASTDeclUnmerger : public DeclVisitor<ASTDeclUnmerger> {
void VisitVarDecl(VarDecl *D) { withdraw(D); }
void VisitTagDecl(TagDecl *D) {
+ // The enumerators of an unscoped enumeration are visible in the enclosing
+ // context.
+ if (auto *ED = dyn_cast<EnumDecl>(D);
+ ED && ED->isThisDeclarationADefinition())
+ VisitDeclContext(ED);
----------------
guitargeek wrote:
You're right! I'm updating the PR accordingly.
https://github.com/llvm/llvm-project/pull/228370
More information about the cfe-commits
mailing list