class TemplateDecl
Declaration
class TemplateDecl : public NamedDecl { /* full declaration omitted */ };
Description
The base class of all kinds of template declarations (e.g., class, function, etc.).
The TemplateDecl class stores the list of template parameters and a reference to the templated scoped declaration: the underlying AST node.
Declared at: clang/include/clang/AST/DeclTemplate.h:409
Inherits from: NamedDecl
Member Variables
- protected clang::NamedDecl* TemplatedDecl
- protected clang::TemplateParameterList* TemplateParams
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- protected TemplateDecl(clang::Decl::Kind DK, clang::DeclContext * DC, clang::SourceLocation L, clang::DeclarationName Name, clang::TemplateParameterList * Params, clang::NamedDecl * Decl)
- protected TemplateDecl(clang::Decl::Kind DK, clang::DeclContext * DC, clang::SourceLocation L, clang::DeclarationName Name, clang::TemplateParameterList * Params)
- private void anchor()
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public void getAssociatedConstraints(llvm::SmallVectorImpl<const Expr *> & AC) const
- public clang::SourceRange getSourceRange() const
- public clang::TemplateParameterList * getTemplateParameters() const
- public clang::NamedDecl * getTemplatedDecl() const
- public bool hasAssociatedConstraints() const
- public void init(clang::NamedDecl * templatedDecl, clang::TemplateParameterList * templateParams)
- protected void setTemplateParameters(clang::TemplateParameterList * TParams)
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
¶TemplateDecl(clang::Decl::Kind DK,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName Name,
clang::TemplateParameterList* Params,
clang::NamedDecl* Decl)
TemplateDecl(clang::Decl::Kind DK,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName Name,
clang::TemplateParameterList* Params,
clang::NamedDecl* Decl)
Declared at: clang/include/clang/AST/DeclTemplate.h:414
Parameters
- clang::Decl::Kind DK
- clang::DeclContext* DC
- clang::SourceLocation L
- clang::DeclarationName Name
- clang::TemplateParameterList* Params
- clang::NamedDecl* Decl
¶TemplateDecl(clang::Decl::Kind DK,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName Name,
clang::TemplateParameterList* Params)
TemplateDecl(clang::Decl::Kind DK,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::DeclarationName Name,
clang::TemplateParameterList* Params)
Declared at: clang/include/clang/AST/DeclTemplate.h:419
Parameters
- clang::Decl::Kind DK
- clang::DeclContext* DC
- clang::SourceLocation L
- clang::DeclarationName Name
- clang::TemplateParameterList* Params
¶void anchor()
void anchor()
Declared at: clang/include/clang/AST/DeclTemplate.h:410
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclTemplate.h:444
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:446
Parameters
- clang::Decl::Kind K
¶void getAssociatedConstraints(
llvm::SmallVectorImpl<const Expr*>& AC) const
void getAssociatedConstraints(
llvm::SmallVectorImpl<const Expr*>& AC) const
Description
Get the total constraint-expression associated with this template, including constraint-expressions derived from the requires-clause, trailing requires-clause (for functions and methods) and constrained template parameters.
Declared at: clang/include/clang/AST/DeclTemplate.h:436
Parameters
- llvm::SmallVectorImpl<const Expr*>& AC
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Source range that this declaration covers.
Declared at: clang/include/clang/AST/DeclTemplate.h:450
¶clang::TemplateParameterList*
getTemplateParameters() const
clang::TemplateParameterList*
getTemplateParameters() const
Description
Get the list of template parameters
Declared at: clang/include/clang/AST/DeclTemplate.h:428
¶clang::NamedDecl* getTemplatedDecl() const
clang::NamedDecl* getTemplatedDecl() const
Description
Get the underlying, templated declaration.
Declared at: clang/include/clang/AST/DeclTemplate.h:441
¶bool hasAssociatedConstraints() const
bool hasAssociatedConstraints() const
Declared at: clang/include/clang/AST/DeclTemplate.h:438
¶void init(
clang::NamedDecl* templatedDecl,
clang::TemplateParameterList* templateParams)
void init(
clang::NamedDecl* templatedDecl,
clang::TemplateParameterList* templateParams)
Description
Initialize the underlying templated declaration and template parameters.
Declared at: clang/include/clang/AST/DeclTemplate.h:466
Parameters
- clang::NamedDecl* templatedDecl
- clang::TemplateParameterList* templateParams
¶void setTemplateParameters(
clang::TemplateParameterList* TParams)
void setTemplateParameters(
clang::TemplateParameterList* TParams)
Declared at: clang/include/clang/AST/DeclTemplate.h:459
Parameters
- clang::TemplateParameterList* TParams