@@ -2131,34 +2131,6 @@ class FunctionDecl : public DeclaratorDecl,
21312131 // / the DeclaratorDecl base class.
21322132 DeclarationNameLoc DNLoc;
21332133
2134- // / Specify that this function declaration is actually a function
2135- // / template specialization.
2136- // /
2137- // / \param C the ASTContext.
2138- // /
2139- // / \param Template the function template that this function template
2140- // / specialization specializes.
2141- // /
2142- // / \param TemplateArgs the template arguments that produced this
2143- // / function template specialization from the template.
2144- // /
2145- // / \param InsertPos If non-NULL, the position in the function template
2146- // / specialization set where the function template specialization data will
2147- // / be inserted.
2148- // /
2149- // / \param TSK the kind of template specialization this is.
2150- // /
2151- // / \param TemplateArgsAsWritten location info of template arguments.
2152- // /
2153- // / \param PointOfInstantiation point at which the function template
2154- // / specialization was first instantiated.
2155- void setFunctionTemplateSpecialization (
2156- ASTContext &C, FunctionTemplateDecl *Template,
2157- TemplateArgumentList *TemplateArgs, void *InsertPos,
2158- TemplateSpecializationKind TSK ,
2159- const TemplateArgumentListInfo *TemplateArgsAsWritten,
2160- SourceLocation PointOfInstantiation);
2161-
21622134 // / Specify that this record is an instantiation of the
21632135 // / member function FD.
21642136 void setInstantiationOfMemberFunction (ASTContext &C, FunctionDecl *FD ,
@@ -2254,6 +2226,8 @@ class FunctionDecl : public DeclaratorDecl,
22542226 return SourceLocation ();
22552227 }
22562228
2229+ SourceLocation getFunctionLocStart () const ;
2230+
22572231 SourceRange getSourceRange () const override LLVM_READONLY;
22582232
22592233 // Function definitions.
@@ -3083,9 +3057,14 @@ class FunctionDecl : public DeclaratorDecl,
30833057 const ASTTemplateArgumentListInfo*
30843058 getTemplateSpecializationArgsAsWritten () const ;
30853059
3060+ // / Returns the template parameter list for an explicit specialization.
3061+ const TemplateParameterList *getTemplateSpecializationParameters () const ;
3062+
30863063 // / Specify that this function declaration is actually a function
30873064 // / template specialization.
30883065 // /
3066+ // / \param C the ASTContext.
3067+ // /
30893068 // / \param Template the function template that this function template
30903069 // / specialization specializes.
30913070 // /
@@ -3098,25 +3077,30 @@ class FunctionDecl : public DeclaratorDecl,
30983077 // /
30993078 // / \param TSK the kind of template specialization this is.
31003079 // /
3080+ // / \param TemplateParams the template parameters if this is an explicit
3081+ // / specialization.
3082+ // /
31013083 // / \param TemplateArgsAsWritten location info of template arguments.
31023084 // /
31033085 // / \param PointOfInstantiation point at which the function template
31043086 // / specialization was first instantiated.
3087+ // /
3088+ // / \param AddSpecialization whether to add this specialization to the
3089+ // / template's specialization set.
3090+ // /
31053091 void setFunctionTemplateSpecialization (
3106- FunctionTemplateDecl *Template, TemplateArgumentList *TemplateArgs,
3107- void *InsertPos,
3108- TemplateSpecializationKind TSK = TSK_ImplicitInstantiation,
3109- TemplateArgumentListInfo *TemplateArgsAsWritten = nullptr ,
3110- SourceLocation PointOfInstantiation = SourceLocation()) {
3111- setFunctionTemplateSpecialization (getASTContext (), Template, TemplateArgs,
3112- InsertPos, TSK , TemplateArgsAsWritten,
3113- PointOfInstantiation);
3114- }
3092+ ASTContext &C, FunctionTemplateDecl *Template,
3093+ TemplateArgumentList *TemplateArgs, void *InsertPos,
3094+ TemplateSpecializationKind TSK ,
3095+ const TemplateParameterList *TemplateParams,
3096+ const TemplateArgumentListInfo *TemplateArgsAsWritten,
3097+ SourceLocation PointOfInstantiation, bool AddSpecialization);
31153098
31163099 // / Specifies that this function declaration is actually a
31173100 // / dependent function template specialization.
31183101 void setDependentTemplateSpecialization (
31193102 ASTContext &Context, const UnresolvedSetImpl &Templates,
3103+ const TemplateParameterList *TemplateParams,
31203104 const TemplateArgumentListInfo *TemplateArgs);
31213105
31223106 DependentFunctionTemplateSpecializationInfo *
0 commit comments