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:
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::FunctionTemplateDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation L, clang::DeclarationName Name, clang::TemplateParameterList * Params, clang::NamedDecl * Decl)
- public static clang::FunctionTemplateDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- protected FunctionTemplateDecl(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation L, clang::DeclarationName Name, clang::TemplateParameterList * Params, clang::NamedDecl * Decl)
- public void LoadLazySpecializations() const
- protected void addSpecialization(clang::FunctionTemplateSpecializationInfo * Info, void * InsertPos)
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public clang::FunctionDecl * findSpecialization(ArrayRef<clang::TemplateArgument> Args, void *& InsertPos)
- public clang::FunctionTemplateDecl * getCanonicalDecl()
- public const clang::FunctionTemplateDecl * getCanonicalDecl() const
- protected clang::FunctionTemplateDecl::Common * getCommonPtr() const
- public ArrayRef<clang::TemplateArgument> getInjectedTemplateArgs()
- public clang::FunctionTemplateDecl * getInstantiatedFromMemberTemplate() const
- public clang::FunctionTemplateDecl * getMostRecentDecl()
- public const clang::FunctionTemplateDecl * getMostRecentDecl() const
- public const clang::FunctionTemplateDecl * getPreviousDecl() const
- public clang::FunctionTemplateDecl * getPreviousDecl()
- protected llvm::FoldingSetVector<FunctionTemplateSpecializationInfo> & getSpecializations() const
- public clang::FunctionDecl * getTemplatedDecl() const
- public bool isAbbreviated() const
- public bool isThisDeclarationADefinition() const
- public void mergePrevDecl(clang::FunctionTemplateDecl * Prev)
- protected clang::RedeclarableTemplateDecl::CommonBase * newCommon(clang::ASTContext & C) const
- public clang::FunctionTemplateDecl::spec_iterator spec_begin() const
- public clang::FunctionTemplateDecl::spec_iterator spec_end() const
- public clang::FunctionTemplateDecl::spec_range specializations() const
Inherited from RedeclarableTemplateDecl:
- protected addSpecializationImpl
- public classof
- public classofKind
- protected findSpecializationImpl
- public getCanonicalDecl
- public getCanonicalDecl
- protected getCommonPtr
- public getInstantiatedFromMemberTemplate
- public isMemberSpecialization
- protected loadLazySpecializationsImpl
- protected makeSpecIterator
- protected newCommon
- public setInstantiatedFromMemberTemplate
- public setMemberSpecialization
Inherited from TemplateDecl:
- public classof
- public classofKind
- public getAssociatedConstraints
- public getSourceRange
- public getTemplateParameters
- public getTemplatedDecl
- public hasAssociatedConstraints
- public init
- protected setTemplateParameters
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::FunctionTemplateDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName Name,
clang::TemplateParameterList* Params,
clang::NamedDecl* Decl)
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)
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)
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
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)
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)
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)
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)
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()
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
const clang::FunctionTemplateDecl*
getCanonicalDecl() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1062
¶clang::FunctionTemplateDecl::Common*
getCommonPtr() const
clang::FunctionTemplateDecl::Common*
getCommonPtr() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1019
¶ArrayRef<clang::TemplateArgument>
getInjectedTemplateArgs()
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
clang::FunctionTemplateDecl*
getInstantiatedFromMemberTemplate() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1087
¶clang::FunctionTemplateDecl* getMostRecentDecl()
clang::FunctionTemplateDecl* getMostRecentDecl()
Declared at: clang/include/clang/AST/DeclTemplate.h:1078
¶const clang::FunctionTemplateDecl*
getMostRecentDecl() const
const clang::FunctionTemplateDecl*
getMostRecentDecl() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1083
¶const clang::FunctionTemplateDecl*
getPreviousDecl() const
const clang::FunctionTemplateDecl*
getPreviousDecl() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1073
¶clang::FunctionTemplateDecl* getPreviousDecl()
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
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
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
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
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)
void mergePrevDecl(
clang::FunctionTemplateDecl* Prev)
Description
Merge \p Prev with our RedeclarableTemplateDecl::Common.
Declared at: clang/include/clang/AST/DeclTemplate.h:1128
Parameters
¶clang::RedeclarableTemplateDecl::CommonBase*
newCommon(clang::ASTContext& C) const
clang::RedeclarableTemplateDecl::CommonBase*
newCommon(clang::ASTContext& C) const
Declared at: clang/include/clang/AST/DeclTemplate.h:1017
Parameters
¶clang::FunctionTemplateDecl::spec_iterator
spec_begin() const
clang::FunctionTemplateDecl::spec_iterator
spec_begin() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1099
¶clang::FunctionTemplateDecl::spec_iterator
spec_end() const
clang::FunctionTemplateDecl::spec_iterator
spec_end() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1103
¶clang::FunctionTemplateDecl::spec_range
specializations() const
clang::FunctionTemplateDecl::spec_range
specializations() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1095