@@ -1841,15 +1841,23 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl,
18411841 LLVM_PREFERRED_TYPE (TemplateSpecializationKind)
18421842 unsigned SpecializationKind : 3 ;
18431843
1844+ // / Indicate that we have matched a parameter pack with a non pack
1845+ // / argument, when the opposite match is also allowed (strict pack match).
1846+ // / This needs to be cached as deduction is performed during declaration,
1847+ // / and we need the information to be preserved so that it is consistent
1848+ // / during instantiation.
1849+ bool MatchedPackOnParmToNonPackOnArg : 1 ;
1850+
18441851protected:
18451852 ClassTemplateSpecializationDecl (ASTContext &Context, Kind DK, TagKind TK,
18461853 DeclContext *DC, SourceLocation StartLoc,
18471854 SourceLocation IdLoc,
18481855 ClassTemplateDecl *SpecializedTemplate,
18491856 ArrayRef<TemplateArgument> Args,
1857+ bool MatchedPackOnParmToNonPackOnArg,
18501858 ClassTemplateSpecializationDecl *PrevDecl);
18511859
1852- explicit ClassTemplateSpecializationDecl (ASTContext &C, Kind DK);
1860+ ClassTemplateSpecializationDecl (ASTContext &C, Kind DK);
18531861
18541862public:
18551863 friend class ASTDeclReader ;
@@ -1859,7 +1867,7 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl,
18591867 Create (ASTContext &Context, TagKind TK, DeclContext *DC,
18601868 SourceLocation StartLoc, SourceLocation IdLoc,
18611869 ClassTemplateDecl *SpecializedTemplate,
1862- ArrayRef<TemplateArgument> Args,
1870+ ArrayRef<TemplateArgument> Args, bool MatchedPackOnParmToNonPackOnArg,
18631871 ClassTemplateSpecializationDecl *PrevDecl);
18641872 static ClassTemplateSpecializationDecl *CreateDeserialized (ASTContext &C,
18651873 GlobalDeclID ID);
@@ -1930,6 +1938,10 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl,
19301938 SpecializationKind = TSK;
19311939 }
19321940
1941+ bool hasMatchedPackOnParmToNonPackOnArg () const {
1942+ return MatchedPackOnParmToNonPackOnArg;
1943+ }
1944+
19331945 // / Get the point of instantiation (if any), or null if none.
19341946 SourceLocation getPointOfInstantiation () const {
19351947 return PointOfInstantiation;
0 commit comments