clang
3.7.0
|
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. More... | |
TemplateSpecializationKind | getTemplateSpecializationKind () const |
Determine what kind of template specialization this is. More... | |
bool | isExplicitSpecialization () const |
bool | isExplicitInstantiationOrSpecialization () const |
True if this declaration is an explicit specialization, explicit instantiation declaration, or explicit instantiation definition. More... | |
void | setTemplateSpecializationKind (TemplateSpecializationKind TSK) |
Set the template specialization kind. More... | |
SourceLocation | getPointOfInstantiation () const |
Retrieve the first point of instantiation of this function template specialization. More... | |
void | setPointOfInstantiation (SourceLocation POI) |
Set the (first) point of instantiation of this function template specialization. More... | |
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, ArrayRef< TemplateArgument > TemplateArgs, ASTContext &Context) |
Public Attributes | |
FunctionDecl * | Function |
The function template specialization that this structure describes. More... | |
llvm::PointerIntPair < FunctionTemplateDecl *, 2 > | Template |
The function template from which this function template specialization was generated. More... | |
const TemplateArgumentList * | TemplateArguments |
The template arguments used to produce the function template specialization from the function template. More... | |
const ASTTemplateArgumentListInfo * | TemplateArgumentsAsWritten |
The template arguments as written in the sources, if provided. More... | |
SourceLocation | PointOfInstantiation |
The point at which this function template specialization was first instantiated. More... | |
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 371 of file DeclTemplate.h.
|
static |
Definition at line 700 of file DeclTemplate.cpp.
References AttributeLangSupport::C, and clang::ASTTemplateArgumentListInfo::Create().
Referenced by clang::ASTDeclReader::VisitFunctionDecl().
|
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 454 of file DeclTemplate.h.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization(), and clang::ASTDeclWriter::VisitFunctionDecl().
|
inline |
Retrieve the template from which this function was specialized.
Definition at line 414 of file DeclTemplate.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::PredefinedExpr::ComputeName(), mergeTemplateLV(), and clang::ASTDeclWriter::VisitFunctionDecl().
|
inline |
Determine what kind of template specialization this is.
Definition at line 417 of file DeclTemplate.h.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization(), clang::FunctionDecl::getTemplateSpecializationKind(), and clang::ASTDeclWriter::VisitFunctionDecl().
|
inline |
True if this declaration is an explicit specialization, explicit instantiation declaration, or explicit instantiation definition.
Definition at line 428 of file DeclTemplate.h.
References getTemplateSpecializationKind(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by shouldConsiderTemplateVisibility().
|
inline |
Definition at line 421 of file DeclTemplate.h.
References getTemplateSpecializationKind(), and clang::TSK_ExplicitSpecialization.
Referenced by clang::PredefinedExpr::ComputeName().
|
inline |
Definition at line 464 of file DeclTemplate.h.
Referenced by clang::ASTDeclReader::VisitFunctionDecl().
|
inlinestatic |
Definition at line 470 of file DeclTemplate.h.
|
inline |
Set the (first) point of instantiation of this function template specialization.
Definition at line 460 of file DeclTemplate.h.
|
inline |
Set the template specialization kind.
Definition at line 443 of file DeclTemplate.h.
References clang::TSK_Undeclared.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization().
FunctionDecl* clang::FunctionTemplateSpecializationInfo::Function |
The function template specialization that this structure describes.
Definition at line 394 of file DeclTemplate.h.
Referenced by clang::RedeclarableTemplateDecl::SpecEntryTraits< FunctionTemplateSpecializationInfo >::getDecl(), and clang::ASTDeclReader::VisitFunctionDecl().
SourceLocation clang::FunctionTemplateSpecializationInfo::PointOfInstantiation |
The point at which this function template specialization was first instantiated.
Definition at line 411 of file DeclTemplate.h.
llvm::PointerIntPair<FunctionTemplateDecl *, 2> clang::FunctionTemplateSpecializationInfo::Template |
The function template from which this function template specialization was generated.
The two bits contain the top 4 values of TemplateSpecializationKind.
Definition at line 400 of file DeclTemplate.h.
const TemplateArgumentList* clang::FunctionTemplateSpecializationInfo::TemplateArguments |
The template arguments used to produce the function template specialization from the function template.
Definition at line 404 of file DeclTemplate.h.
Referenced by clang::PredefinedExpr::ComputeName(), clang::RedeclarableTemplateDecl::SpecEntryTraits< FunctionTemplateSpecializationInfo >::getTemplateArgs(), mergeTemplateLV(), and clang::ASTDeclWriter::VisitFunctionDecl().
const ASTTemplateArgumentListInfo* clang::FunctionTemplateSpecializationInfo::TemplateArgumentsAsWritten |
The template arguments as written in the sources, if provided.
Definition at line 407 of file DeclTemplate.h.
Referenced by clang::ASTDeclWriter::VisitFunctionDecl().