class FunctionTemplateDecl

Declaration

class FunctionTemplateDecl : public RedeclarableTemplateDecl { /* full declaration omitted */ };

Description

Declaration of a template function.

Declared at: clang/include/clang/AST/DeclTemplate.h:988

Inherits from: RedeclarableTemplateDecl

Member Variables

Inherited from RedeclarableTemplateDecl:

protected Common = nullptr

Inherited from TemplateDecl:

protected TemplatedDecl
protected TemplateParams

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

Inherited from RedeclarableTemplateDecl:

Inherited from TemplateDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

static clang::FunctionTemplateDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::TemplateParameterList* Params,
    clang::NamedDecl* Decl)

Description

Create a function template node.

Declared at: clang/include/clang/AST/DeclTemplate.h:1131

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::TemplateParameterList* Params
clang::NamedDecl* Decl

static clang::FunctionTemplateDecl*
CreateDeserialized(clang::ASTContext& C,
                   unsigned int ID)

Description

Create an empty function template node.

Declared at: clang/include/clang/AST/DeclTemplate.h:1138

Parameters

clang::ASTContext& C
unsigned int ID

FunctionTemplateDecl(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::TemplateParameterList* Params,
    clang::NamedDecl* Decl)

Declared at: clang/include/clang/AST/DeclTemplate.h:1011

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::TemplateParameterList* Params
clang::NamedDecl* Decl

void LoadLazySpecializations() const

Description

Load any lazily-loaded specializations from the external source.

Declared at: clang/include/clang/AST/DeclTemplate.h:1040

void addSpecialization(
    clang::FunctionTemplateSpecializationInfo*
        Info,
    void* InsertPos)

Description

Add a specialization of this function template.

Declared at: clang/include/clang/AST/DeclTemplate.h:1032

Parameters

clang::FunctionTemplateSpecializationInfo* Info
void* InsertPos
Insert position in the FoldingSetVector, must have been retrieved by an earlier call to findSpecialization().

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclTemplate.h:1141

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclTemplate.h:1142

Parameters

clang::Decl::Kind K

clang::FunctionDecl* findSpecialization(
    ArrayRef<clang::TemplateArgument> Args,
    void*& InsertPos)

Description

Return the specialization with the provided arguments if it exists, otherwise return the insertion point.

Declared at: clang/include/clang/AST/DeclTemplate.h:1055

Parameters

ArrayRef<clang::TemplateArgument> Args
void*& InsertPos

clang::FunctionTemplateDecl* getCanonicalDecl()

Description

Retrieves the canonical declaration of this template.

Declared at: clang/include/clang/AST/DeclTemplate.h:1058

const clang::FunctionTemplateDecl*
getCanonicalDecl() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1062

clang::FunctionTemplateDecl::Common*
getCommonPtr() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1019

ArrayRef<clang::TemplateArgument>
getInjectedTemplateArgs()

Description

Retrieve the "injected" template arguments that correspond to the template parameters of this function template. Although the C++ standard has no notion of the "injected" template arguments for a function template, the notion is convenient when we need to perform substitutions inside the definition of a function template.

Declared at: clang/include/clang/AST/DeclTemplate.h:1114

clang::FunctionTemplateDecl*
getInstantiatedFromMemberTemplate() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1087

clang::FunctionTemplateDecl* getMostRecentDecl()

Declared at: clang/include/clang/AST/DeclTemplate.h:1078

const clang::FunctionTemplateDecl*
getMostRecentDecl() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1083

const clang::FunctionTemplateDecl*
getPreviousDecl() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1073

clang::FunctionTemplateDecl* getPreviousDecl()

Description

Retrieve the previous declaration of this function template, or nullptr if no such declaration exists.

Declared at: clang/include/clang/AST/DeclTemplate.h:1069

llvm::FoldingSetVector<
    FunctionTemplateSpecializationInfo>&
getSpecializations() const

Description

Retrieve the set of function template specializations of this function template.

Declared at: clang/include/clang/AST/DeclTemplate.h:1026

clang::FunctionDecl* getTemplatedDecl() const

Description

Get the underlying function declaration of the template.

Declared at: clang/include/clang/AST/DeclTemplate.h:1043

bool isAbbreviated() const

Description

Return whether this function template is an abbreviated function template, e.g. `void foo(auto x)` or `template <typename T> void foo(auto x)`

Declared at: clang/include/clang/AST/DeclTemplate.h:1118

bool isThisDeclarationADefinition() const

Description

Returns whether this template declaration defines the primary pattern.

Declared at: clang/include/clang/AST/DeclTemplate.h:1049

void mergePrevDecl(
    clang::FunctionTemplateDecl* Prev)

Description

Merge \p Prev with our RedeclarableTemplateDecl::Common.

Declared at: clang/include/clang/AST/DeclTemplate.h:1128

Parameters

clang::FunctionTemplateDecl* Prev

clang::RedeclarableTemplateDecl::CommonBase*
newCommon(clang::ASTContext& C) const

Declared at: clang/include/clang/AST/DeclTemplate.h:1017

Parameters

clang::ASTContext& C

clang::FunctionTemplateDecl::spec_iterator
spec_begin() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1099

clang::FunctionTemplateDecl::spec_iterator
spec_end() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1103

clang::FunctionTemplateDecl::spec_range
specializations() const

Declared at: clang/include/clang/AST/DeclTemplate.h:1095