clang API Documentation
Provides information about a function template specialization, which is a FunctionDecl that has been explicitly specialization or instantiated from a function template. More...
#include <DeclTemplate.h>


Public Member Functions | |
| FunctionTemplateDecl * | getTemplate () const |
| Retrieve the template from which this function was specialized. | |
| TemplateSpecializationKind | getTemplateSpecializationKind () const |
| Determine what kind of template specialization this is. | |
| bool | isExplicitSpecialization () const |
| void | setTemplateSpecializationKind (TemplateSpecializationKind TSK) |
| Set the template specialization kind. | |
| SourceLocation | getPointOfInstantiation () const |
| Retrieve the first point of instantiation of this function template specialization. | |
| void | setPointOfInstantiation (SourceLocation POI) |
| Set the (first) point of instantiation of this function template specialization. | |
| void | Profile (llvm::FoldingSetNodeID &ID) |
Static Public Member Functions | |
| static FunctionTemplateSpecializationInfo * | Create (ASTContext &C, FunctionDecl *FD, FunctionTemplateDecl *Template, TemplateSpecializationKind TSK, const TemplateArgumentList *TemplateArgs, const TemplateArgumentListInfo *TemplateArgsAsWritten, SourceLocation POI) |
| static void | Profile (llvm::FoldingSetNodeID &ID, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, ASTContext &Context) |
Public Attributes | |
| FunctionDecl * | Function |
| The function template specialization that this structure describes. | |
| llvm::PointerIntPair < FunctionTemplateDecl *, 2 > | Template |
| The function template from which this function template specialization was generated. | |
| const TemplateArgumentList * | TemplateArguments |
| The template arguments used to produce the function template specialization from the function template. | |
| const ASTTemplateArgumentListInfo * | TemplateArgumentsAsWritten |
| The template arguments as written in the sources, if provided. | |
| SourceLocation | PointOfInstantiation |
| The point at which this function template specialization was first instantiated. | |
Provides information about a function template specialization, which is a FunctionDecl that has been explicitly specialization or instantiated from a function template.
Definition at line 266 of file DeclTemplate.h.
| FunctionTemplateSpecializationInfo * FunctionTemplateSpecializationInfo::Create | ( | ASTContext & | C, |
| FunctionDecl * | FD, | ||
| FunctionTemplateDecl * | Template, | ||
| TemplateSpecializationKind | TSK, | ||
| const TemplateArgumentList * | TemplateArgs, | ||
| const TemplateArgumentListInfo * | TemplateArgsAsWritten, | ||
| SourceLocation | POI | ||
| ) | [static] |
Definition at line 613 of file DeclTemplate.cpp.
Referenced by clang::ASTDeclReader::VisitFunctionDecl().
| SourceLocation clang::FunctionTemplateSpecializationInfo::getPointOfInstantiation | ( | ) | const [inline] |
Retrieve the first point of instantiation of this function template specialization.
The point of instantiation may be an invalid source location if this function has yet to be instantiated.
Definition at line 332 of file DeclTemplate.h.
References PointOfInstantiation.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization(), and clang::ASTDeclWriter::VisitFunctionDecl().
| FunctionTemplateDecl* clang::FunctionTemplateSpecializationInfo::getTemplate | ( | ) | const [inline] |
Retrieve the template from which this function was specialized.
Definition at line 309 of file DeclTemplate.h.
Referenced by clang::PredefinedExpr::ComputeName(), and clang::ASTDeclWriter::VisitFunctionDecl().
| TemplateSpecializationKind clang::FunctionTemplateSpecializationInfo::getTemplateSpecializationKind | ( | ) | const [inline] |
Determine what kind of template specialization this is.
Definition at line 312 of file DeclTemplate.h.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization(), clang::FunctionDecl::getTemplateSpecializationKind(), isExplicitSpecialization(), and clang::ASTDeclWriter::VisitFunctionDecl().
| bool clang::FunctionTemplateSpecializationInfo::isExplicitSpecialization | ( | ) | const [inline] |
Definition at line 316 of file DeclTemplate.h.
References getTemplateSpecializationKind(), and clang::TSK_ExplicitSpecialization.
Referenced by clang::PredefinedExpr::ComputeName(), and shouldConsiderTemplateLV().
| void clang::FunctionTemplateSpecializationInfo::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | [inline] |
Definition at line 342 of file DeclTemplate.h.
References clang::TemplateArgumentList::data(), Function, clang::Decl::getASTContext(), clang::TemplateArgumentList::size(), and TemplateArguments.
Referenced by Profile(), and clang::ASTDeclReader::VisitFunctionDecl().
| static void clang::FunctionTemplateSpecializationInfo::Profile | ( | llvm::FoldingSetNodeID & | ID, |
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| ASTContext & | Context | ||
| ) | [inline, static] |
Definition at line 349 of file DeclTemplate.h.
| void clang::FunctionTemplateSpecializationInfo::setPointOfInstantiation | ( | SourceLocation | POI | ) | [inline] |
Set the (first) point of instantiation of this function template specialization.
Definition at line 338 of file DeclTemplate.h.
References PointOfInstantiation.
| void clang::FunctionTemplateSpecializationInfo::setTemplateSpecializationKind | ( | TemplateSpecializationKind | TSK | ) | [inline] |
Set the template specialization kind.
Definition at line 321 of file DeclTemplate.h.
References clang::TSK_Undeclared.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization().
The function template specialization that this structure describes.
Definition at line 289 of file DeclTemplate.h.
Referenced by clang::FunctionTemplateDecl::addSpecialization(), clang::RedeclarableTemplateDecl::SpecEntryTraits< FunctionTemplateSpecializationInfo >::getMostRecentDecl(), and Profile().
The point at which this function template specialization was first instantiated.
Definition at line 306 of file DeclTemplate.h.
Referenced by getPointOfInstantiation(), and setPointOfInstantiation().
| llvm::PointerIntPair<FunctionTemplateDecl *, 2> clang::FunctionTemplateSpecializationInfo::Template |
The function template from which this function template specialization was generated.
The two bits are contain the top 4 values of TemplateSpecializationKind.
Definition at line 295 of file DeclTemplate.h.
The template arguments used to produce the function template specialization from the function template.
Definition at line 299 of file DeclTemplate.h.
Referenced by clang::PredefinedExpr::ComputeName(), Profile(), and clang::ASTDeclWriter::VisitFunctionDecl().
| const ASTTemplateArgumentListInfo* clang::FunctionTemplateSpecializationInfo::TemplateArgumentsAsWritten |
The template arguments as written in the sources, if provided.
Definition at line 302 of file DeclTemplate.h.
Referenced by clang::ASTDeclWriter::VisitFunctionDecl().