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
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

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


Member Function Documentation

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]
bool clang::FunctionTemplateSpecializationInfo::isExplicitSpecialization ( ) const [inline]
void clang::FunctionTemplateSpecializationInfo::Profile ( llvm::FoldingSetNodeID &  ID) [inline]
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.

References Arg, and Profile().

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().


Member Data Documentation

The point at which this function template specialization was first instantiated.

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

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

Definition at line 302 of file DeclTemplate.h.

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


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