[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

Qizhi Hu via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 7 06:20:49 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()) {
----------------
jcsxky wrote:

These checks include name conflict and reserved identifier or not. From this perspective I think it's required here. It will take some time to attempt to skip calling `PushOnScopeChains` and run unittest to find failed cases.

https://github.com/llvm/llvm-project/pull/87144


More information about the cfe-commits mailing list