================ @@ -7964,8 +7964,9 @@ NamedDecl *Sema::ActOnVariableDeclarator( D.setRedeclaration(CheckVariableDeclaration(NewVD, Previous)); } else { // If this is an explicit specialization of a static data member, check it. - if (IsMemberSpecialization && !IsVariableTemplateSpecialization && - !NewVD->isInvalidDecl() && CheckMemberSpecialization(NewVD, Previous)) + if (IsMemberSpecialization && !IsVariableTemplate && + !IsVariableTemplateSpecialization && !NewVD->isInvalidDecl() && + CheckMemberSpecialization(NewVD, Previous)) ---------------- zygoloid wrote:
Hm, do we not want to do these checks for an explicit specialization of a member template? Or do we also do those checks somewhere else? For example, it looks like we would probably have been diagnosing this here previously: ```c++ template<typename T> struct A { template<typename U> static int b; }; namespace N { template<> template<typename U> int A<int>::b; } ``` Are we still properly diagnosing this? https://github.com/llvm/llvm-project/pull/101721 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits