clang API Documentation
#include <DeclTemplate.h>


Public Member Functions | |
| TemplateParameterList * | getTemplateParameters () const |
| Get the list of template parameters. | |
| NamedDecl * | getTemplatedDecl () const |
| Get the underlying, templated declaration. | |
| SourceRange | getSourceRange () const |
| 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 | classof (const TemplateDecl *D) |
| static bool | classof (const RedeclarableTemplateDecl *D) |
| static bool | classof (const FunctionTemplateDecl *D) |
| static bool | classof (const ClassTemplateDecl *D) |
| static bool | classof (const TemplateTemplateParmDecl *D) |
| static bool | classof (const TypeAliasTemplateDecl *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 | |
| NamedDecl * | TemplatedDecl |
| TemplateParameterList * | TemplateParams |
TemplateDecl - 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 201 of file DeclTemplate.h.
| clang::TemplateDecl::TemplateDecl | ( | Kind | DK, |
| DeclContext * | DC, | ||
| SourceLocation | L, | ||
| DeclarationName | Name | ||
| ) | [inline, protected] |
Definition at line 205 of file DeclTemplate.h.
| clang::TemplateDecl::TemplateDecl | ( | Kind | DK, |
| DeclContext * | DC, | ||
| SourceLocation | L, | ||
| DeclarationName | Name, | ||
| TemplateParameterList * | Params | ||
| ) | [inline, protected] |
Definition at line 211 of file DeclTemplate.h.
| clang::TemplateDecl::TemplateDecl | ( | Kind | DK, |
| DeclContext * | DC, | ||
| SourceLocation | L, | ||
| DeclarationName | Name, | ||
| TemplateParameterList * | Params, | ||
| NamedDecl * | Decl | ||
| ) | [inline, protected] |
Definition at line 216 of file DeclTemplate.h.
| static bool clang::TemplateDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Reimplemented in clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::TemplateTemplateParmDecl, clang::FunctionTemplateDecl, and clang::RedeclarableTemplateDecl.
Definition at line 231 of file DeclTemplate.h.
References classofKind(), and clang::Decl::getKind().
| static bool clang::TemplateDecl::classof | ( | const TemplateDecl * | D | ) | [inline, static] |
Definition at line 232 of file DeclTemplate.h.
| static bool clang::TemplateDecl::classof | ( | const RedeclarableTemplateDecl * | D | ) | [inline, static] |
Reimplemented in clang::RedeclarableTemplateDecl.
Definition at line 233 of file DeclTemplate.h.
| static bool clang::TemplateDecl::classof | ( | const FunctionTemplateDecl * | D | ) | [inline, static] |
Reimplemented in clang::FunctionTemplateDecl, and clang::RedeclarableTemplateDecl.
Definition at line 234 of file DeclTemplate.h.
| static bool clang::TemplateDecl::classof | ( | const ClassTemplateDecl * | D | ) | [inline, static] |
Reimplemented in clang::ClassTemplateDecl, and clang::RedeclarableTemplateDecl.
Definition at line 235 of file DeclTemplate.h.
| static bool clang::TemplateDecl::classof | ( | const TemplateTemplateParmDecl * | D | ) | [inline, static] |
Reimplemented in clang::TemplateTemplateParmDecl.
Definition at line 236 of file DeclTemplate.h.
| static bool clang::TemplateDecl::classof | ( | const TypeAliasTemplateDecl * | D | ) | [inline, static] |
Reimplemented in clang::TypeAliasTemplateDecl, and clang::RedeclarableTemplateDecl.
Definition at line 237 of file DeclTemplate.h.
| static bool clang::TemplateDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Reimplemented in clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::TemplateTemplateParmDecl, clang::FunctionTemplateDecl, and clang::RedeclarableTemplateDecl.
Definition at line 238 of file DeclTemplate.h.
Referenced by classof().
| SourceRange clang::TemplateDecl::getSourceRange | ( | ) | const [inline, virtual] |
Source range that this declaration covers.
Reimplemented from clang::Decl.
Reimplemented in clang::TemplateTemplateParmDecl.
Definition at line 242 of file DeclTemplate.h.
References clang::SourceRange::getEnd(), clang::Decl::getSourceRange(), clang::TemplateParameterList::getTemplateLoc(), TemplatedDecl, and TemplateParams.
Referenced by clang::Sema::FinishTemplateArgumentDeduction(), and clang::ClassTemplateSpecializationDecl::getSourceRange().
| NamedDecl* clang::TemplateDecl::getTemplatedDecl | ( | ) | const [inline] |
Get the underlying, templated declaration.
Reimplemented in clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, and clang::FunctionTemplateDecl.
Definition at line 228 of file DeclTemplate.h.
References TemplatedDecl.
Referenced by clang::ASTDeclWriter::VisitTemplateDecl().
| TemplateParameterList* clang::TemplateDecl::getTemplateParameters | ( | ) | const [inline] |
Get the list of template parameters.
Definition at line 223 of file DeclTemplate.h.
References TemplateParams.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnFunctionDeclarator(), AddTemplateParameterChunks(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateIdType(), clang::Sema::DeduceTemplateArguments(), diagnoseArityMismatch(), DiagnoseUnexpandedParameterPacks(), FinishTemplateArgumentDeduction(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::FunctionTemplateDecl::getInjectedTemplateArgs(), clang::TemplateTemplateParmDecl::getSourceRange(), hasDeducibleTemplateParameters(), isAtLeastAsSpecializedAs(), clang::Sema::IsOverload(), clang::Sema::isStdInitializerList(), IsStructurallyEquivalent(), LookupStdInitializerList(), clang::Sema::MarkDeducedTemplateParameters(), MatchTemplateParameterKind(), clang::Sema::PrintInstantiationStack(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitFunctionTemplateDecl(), clang::ASTDeclWriter::VisitTemplateDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitTemplateTemplateParmDecl(), and clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl().
| void clang::TemplateDecl::init | ( | NamedDecl * | templatedDecl, |
| TemplateParameterList * | templateParams | ||
| ) | [inline] |
Initialize the underlying templated declaration and template parameters.
Definition at line 254 of file DeclTemplate.h.
References TemplatedDecl, and TemplateParams.
Referenced by clang::ASTDeclReader::VisitTemplateDecl().
NamedDecl* clang::TemplateDecl::TemplatedDecl [protected] |
Definition at line 248 of file DeclTemplate.h.
Referenced by getSourceRange(), getTemplatedDecl(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TypeAliasTemplateDecl::getTemplatedDecl(), and init().
TemplateParameterList* clang::TemplateDecl::TemplateParams [protected] |
Definition at line 249 of file DeclTemplate.h.
Referenced by getSourceRange(), getTemplateParameters(), and init().