================ @@ -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)) ---------------- sdkrystian 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? `CheckMemberSpecialization` only handles explicit specializations of non-template members specialized for an implicit instantiation of a class template. Explicit specializations of _member templates_ specialized for an implicit instantiation of a class template are handled on the same codepath as normal templates, and we set the correct "instantiated from" template there. 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