clang API Documentation

Public Member Functions | Static Public Member Functions | Public Attributes
clang::FunctionTemplateSpecializationInfo Class Reference

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>

Inheritance diagram for clang::FunctionTemplateSpecializationInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::FunctionTemplateSpecializationInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

FunctionTemplateDeclgetTemplate () const
 Retrieve the template from which this function was specialized.
TemplateSpecializationKind getTemplateSpecializationKind () const
 Determine what kind of template specialization this is.
bool isExplicitSpecialization () const
bool isExplicitInstantiationOrSpecialization () const
 True if this declaration is an explicit specialization, explicit instantiation declaration, or explicit instantiation definition.
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, ArrayRef< TemplateArgument > TemplateArgs, ASTContext &Context)

Public Attributes

FunctionDeclFunction
 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 TemplateArgumentListTemplateArguments
 The template arguments used to produce the function template specialization from the function template.
const ASTTemplateArgumentListInfoTemplateArgumentsAsWritten
 The template arguments as written in the sources, if provided.
SourceLocation PointOfInstantiation
 The point at which this function template specialization was first instantiated.

Detailed Description

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 289 of file DeclTemplate.h.


Member Function Documentation

Definition at line 663 of file DeclTemplate.cpp.

References AttributeLangSupport::C.

Referenced by clang::ASTDeclReader::VisitFunctionDecl().

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 372 of file DeclTemplate.h.

References PointOfInstantiation.

Referenced by clang::Sema::CheckFunctionTemplateSpecialization(), and clang::ASTDeclWriter::VisitFunctionDecl().

Retrieve the template from which this function was specialized.

Definition at line 332 of file DeclTemplate.h.

Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::PredefinedExpr::ComputeName(), mergeTemplateLV(), and clang::ASTDeclWriter::VisitFunctionDecl().

True if this declaration is an explicit specialization, explicit instantiation declaration, or explicit instantiation definition.

Definition at line 346 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().

void clang::FunctionTemplateSpecializationInfo::Profile ( llvm::FoldingSetNodeID &  ID) [inline]
static void clang::FunctionTemplateSpecializationInfo::Profile ( llvm::FoldingSetNodeID &  ID,
ArrayRef< TemplateArgument TemplateArgs,
ASTContext Context 
) [inline, static]

Definition at line 388 of file DeclTemplate.h.

References Profile().

Set the (first) point of instantiation of this function template specialization.

Definition at line 378 of file DeclTemplate.h.

References PointOfInstantiation.

Set the template specialization kind.

Definition at line 361 of file DeclTemplate.h.

References clang::TSK_Undeclared.

Referenced by clang::Sema::CheckFunctionTemplateSpecialization().


Member Data Documentation

The function template specialization that this structure describes.

Definition at line 312 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 329 of file DeclTemplate.h.

Referenced by getPointOfInstantiation(), and setPointOfInstantiation().

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 318 of file DeclTemplate.h.

The template arguments used to produce the function template specialization from the function template.

Definition at line 322 of file DeclTemplate.h.

Referenced by clang::PredefinedExpr::ComputeName(), mergeTemplateLV(), Profile(), and clang::ASTDeclWriter::VisitFunctionDecl().

The template arguments as written in the sources, if provided.

Definition at line 325 of file DeclTemplate.h.

Referenced by clang::ASTDeclWriter::VisitFunctionDecl().


The documentation for this class was generated from the following files: