clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
clang::TemplateDecl Class Reference

The base class of all kinds of template declarations (e.g., class, function, etc.). More...

#include <DeclTemplate.h>

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

List of all members.

Public Member Functions

TemplateParameterListgetTemplateParameters () const
 Get the list of template parameters.
NamedDeclgetTemplatedDecl () const
 Get the underlying, templated declaration.
SourceRange getSourceRange () const override LLVM_READONLY
 Source range that this declaration covers.
void init (NamedDecl *templatedDecl, TemplateParameterList *templateParams)
 Initialize the underlying templated declaration and template parameters.

Static Public Member Functions

static bool classof (const Decl *D)
static bool classofKind (Kind K)

Protected Member Functions

 TemplateDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name)
 TemplateDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params)
 TemplateDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl)

Protected Attributes

NamedDeclTemplatedDecl
TemplateParameterListTemplateParams

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

Definition at line 229 of file DeclTemplate.h.


Constructor & Destructor Documentation

clang::TemplateDecl::TemplateDecl ( Kind  DK,
DeclContext DC,
SourceLocation  L,
DeclarationName  Name 
) [inline, protected]

Definition at line 233 of file DeclTemplate.h.

clang::TemplateDecl::TemplateDecl ( Kind  DK,
DeclContext DC,
SourceLocation  L,
DeclarationName  Name,
TemplateParameterList Params 
) [inline, protected]

Definition at line 240 of file DeclTemplate.h.

clang::TemplateDecl::TemplateDecl ( Kind  DK,
DeclContext DC,
SourceLocation  L,
DeclarationName  Name,
TemplateParameterList Params,
NamedDecl Decl 
) [inline, protected]

Definition at line 246 of file DeclTemplate.h.


Member Function Documentation

static bool clang::TemplateDecl::classof ( const Decl D) [inline, static]
static bool clang::TemplateDecl::classofKind ( Kind  K) [inline, static]
SourceRange clang::TemplateDecl::getSourceRange ( ) const [inline, override, virtual]

Get the list of template parameters.

Definition at line 253 of file DeclTemplate.h.

References TemplateParams.

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), addFunctionPointerConversion(), AddTemplateParameterChunks(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateArgumentList(), clang::PredefinedExpr::ComputeName(), clang::Sema::DeduceTemplateArguments(), diagnoseArityMismatch(), DiagnoseUnexpandedParameterPacks(), clang::comments::DeclInfo::fill(), FinishTemplateArgumentDeduction(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::FunctionTemplateDecl::getInjectedTemplateArgs(), getLVForTemplateParameterList(), clang::TemplateTemplateParmDecl::getSourceRange(), hasDeducibleTemplateParameters(), isAtLeastAsSpecializedAs(), clang::Sema::IsOverload(), clang::TemplateTemplateParmDecl::isPackExpansion(), isSameEntity(), isSameTemplateParameter(), clang::Sema::isStdInitializerList(), IsStructurallyEquivalent(), LookupStdInitializerList(), clang::Sema::MarkDeducedTemplateParameters(), MatchTemplateParameterKind(), mergeTemplateLV(), clang::Sema::MergeVarDecl(), clang::Sema::PrintInstantiationStack(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTDeclWriter::VisitTemplateDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), and clang::ASTNodeImporter::VisitVarTemplateDecl().

void clang::TemplateDecl::init ( NamedDecl templatedDecl,
TemplateParameterList templateParams 
) [inline]

Initialize the underlying templated declaration and template parameters.

Definition at line 278 of file DeclTemplate.h.

References TemplatedDecl, and TemplateParams.

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


Member Data Documentation

Definition at line 273 of file DeclTemplate.h.

Referenced by getSourceRange(), getTemplateParameters(), and init().


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