================ @@ -8341,6 +8341,11 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, // shadowing context, but that's just a false negative. } + // Skip shadowing check if we're in a class scope, dealing with an enum + // constant in a different context. + if (S->isClassScope() && isa<EnumConstantDecl>(D) && ---------------- Fznamznon wrote:
Can we simply check that `NewDC->isRecord()` here instead of using a new `Scope` parameter? https://github.com/llvm/llvm-project/pull/115656 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits