@@ -3990,7 +3990,8 @@ bool Sema::usesPartialOrExplicitSpecialization(
3990
3990
// given (implicit) specialization of the enclosing class template, the
3991
3991
// primary member template and its other partial specializations are still
3992
3992
// considered for this specialization of the enclosing class template.
3993
- if (CTD->isMemberSpecialization () && !CTPSD->isMemberSpecialization ())
3993
+ if (CTD->getMostRecentDecl ()->isMemberSpecialization () &&
3994
+ !CTPSD->getMostRecentDecl ()->isMemberSpecialization ())
3994
3995
continue ;
3995
3996
3996
3997
TemplateDeductionInfo Info (Loc);
@@ -4037,8 +4038,7 @@ getPatternForClassTemplateSpecialization(
4037
4038
SmallVector<ClassTemplatePartialSpecializationDecl *, 4 > PartialSpecs;
4038
4039
Template->getPartialSpecializations (PartialSpecs);
4039
4040
TemplateSpecCandidateSet FailedCandidates (PointOfInstantiation);
4040
- for (unsigned I = 0 , N = PartialSpecs.size (); I != N; ++I) {
4041
- ClassTemplatePartialSpecializationDecl *Partial = PartialSpecs[I];
4041
+ for (ClassTemplatePartialSpecializationDecl *Partial : PartialSpecs) {
4042
4042
// C++ [temp.spec.partial.member]p2:
4043
4043
// If the primary member template is explicitly specialized for a given
4044
4044
// (implicit) specialization of the enclosing class template, the
@@ -4049,8 +4049,8 @@ getPatternForClassTemplateSpecialization(
4049
4049
// primary member template and its other partial specializations are
4050
4050
// still considered for this specialization of the enclosing class
4051
4051
// template.
4052
- if (Template->isMemberSpecialization () &&
4053
- !Partial->isMemberSpecialization ())
4052
+ if (Template->getMostRecentDecl ()-> isMemberSpecialization () &&
4053
+ !Partial->getMostRecentDecl ()-> isMemberSpecialization ())
4054
4054
continue ;
4055
4055
4056
4056
TemplateDeductionInfo Info (FailedCandidates.getLocation ());
0 commit comments