clang API Documentation
#include <DeclTemplate.h>


Public Member Functions | |
| bool | isParameterPack () const |
| Whether this template template parameter is a template parameter pack. | |
| bool | isPackExpansion () const |
| Whether this parameter pack is a pack expansion. | |
| bool | isExpandedParameterPack () const |
| Whether this parameter is a template template parameter pack that has a known list of different template parameter lists at different positions. | |
| unsigned | getNumExpansionTemplateParameters () const |
| Retrieves the number of expansion template parameters in an expanded parameter pack. | |
| TemplateParameterList * | getExpansionTemplateParameters (unsigned I) const |
| Retrieve a particular expansion type within an expanded parameter pack. | |
| bool | hasDefaultArgument () const |
| Determine whether this template parameter has a default argument. | |
| const TemplateArgumentLoc & | getDefaultArgument () const |
| Retrieve the default argument, if any. | |
| SourceLocation | getDefaultArgumentLoc () const |
| Retrieve the location of the default argument, if any. | |
| bool | defaultArgumentWasInherited () const |
| Determines whether the default argument was inherited from a previous declaration of this template. | |
| void | setDefaultArgument (const TemplateArgumentLoc &DefArg, bool Inherited) |
| Set the default argument for this template parameter, and whether that default argument was inherited from another declaration. | |
| void | removeDefaultArgument () |
| Removes the default argument of this template parameter. | |
| SourceRange | getSourceRange () const override LLVM_READONLY |
| Source range that this declaration covers. | |
Static Public Member Functions | |
| static TemplateTemplateParmDecl * | Create (const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, bool ParameterPack, IdentifierInfo *Id, TemplateParameterList *Params) |
| static TemplateTemplateParmDecl * | Create (const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, IdentifierInfo *Id, TemplateParameterList *Params, ArrayRef< TemplateParameterList * > Expansions) |
| static TemplateTemplateParmDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
| static TemplateTemplateParmDecl * | CreateDeserialized (ASTContext &C, unsigned ID, unsigned NumExpansions) |
| static bool | classof (const Decl *D) |
| static bool | classofKind (Kind K) |
Friends | |
| class | ASTDeclReader |
| class | ASTDeclWriter |
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in
template <template <typename> class T> class container { };
A template template parameter is a TemplateDecl because it defines the name of a template and the template parameters allowable for substitution.
Definition at line 1214 of file DeclTemplate.h.
| static bool clang::TemplateTemplateParmDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::TemplateDecl.
Definition at line 1366 of file DeclTemplate.h.
References classofKind(), and clang::Decl::getKind().
| static bool clang::TemplateTemplateParmDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::TemplateDecl.
Definition at line 1367 of file DeclTemplate.h.
Referenced by classof().
| TemplateTemplateParmDecl * TemplateTemplateParmDecl::Create | ( | const ASTContext & | C, |
| DeclContext * | DC, | ||
| SourceLocation | L, | ||
| unsigned | D, | ||
| unsigned | P, | ||
| bool | ParameterPack, | ||
| IdentifierInfo * | Id, | ||
| TemplateParameterList * | Params | ||
| ) | [static] |
Definition at line 612 of file DeclTemplate.cpp.
References AttributeLangSupport::C.
Referenced by clang::Sema::ActOnTemplateTemplateParameter(), and clang::ASTNodeImporter::VisitTemplateTemplateParmDecl().
| TemplateTemplateParmDecl * TemplateTemplateParmDecl::Create | ( | const ASTContext & | C, |
| DeclContext * | DC, | ||
| SourceLocation | L, | ||
| unsigned | D, | ||
| unsigned | P, | ||
| IdentifierInfo * | Id, | ||
| TemplateParameterList * | Params, | ||
| ArrayRef< TemplateParameterList * > | Expansions | ||
| ) | [static] |
Definition at line 621 of file DeclTemplate.cpp.
References AttributeLangSupport::C, and clang::TemplateParameterList::size().
| TemplateTemplateParmDecl * TemplateTemplateParmDecl::CreateDeserialized | ( | ASTContext & | C, |
| unsigned | ID | ||
| ) | [static] |
Definition at line 632 of file DeclTemplate.cpp.
References AttributeLangSupport::C.
| TemplateTemplateParmDecl * TemplateTemplateParmDecl::CreateDeserialized | ( | ASTContext & | C, |
| unsigned | ID, | ||
| unsigned | NumExpansions | ||
| ) | [static] |
Definition at line 638 of file DeclTemplate.cpp.
References AttributeLangSupport::C.
| bool clang::TemplateTemplateParmDecl::defaultArgumentWasInherited | ( | ) | const [inline] |
Determines whether the default argument was inherited from a previous declaration of this template.
Definition at line 1340 of file DeclTemplate.h.
Referenced by getSourceRange(), and clang::ASTDeclWriter::VisitTemplateTemplateParmDecl().
| const TemplateArgumentLoc& clang::TemplateTemplateParmDecl::getDefaultArgument | ( | ) | const [inline] |
Retrieve the default argument, if any.
Definition at line 1331 of file DeclTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateParameterList(), getSourceRange(), SubstDefaultTemplateArgument(), clang::Sema::SubstDefaultTemplateArgumentIfAvailable(), and clang::ASTDeclWriter::VisitTemplateTemplateParmDecl().
Retrieve the location of the default argument, if any.
| TemplateParameterList* clang::TemplateTemplateParmDecl::getExpansionTemplateParameters | ( | unsigned | I | ) | const [inline] |
Retrieve a particular expansion type within an expanded parameter pack.
Definition at line 1319 of file DeclTemplate.h.
Referenced by clang::Sema::CheckTemplateArgument(), getLVForTemplateParameterList(), and clang::ASTDeclWriter::VisitTemplateTemplateParmDecl().
| unsigned clang::TemplateTemplateParmDecl::getNumExpansionTemplateParameters | ( | ) | const [inline] |
Retrieves the number of expansion template parameters in an expanded parameter pack.
Definition at line 1312 of file DeclTemplate.h.
Referenced by getLVForTemplateParameterList(), clang::ASTDeclWriter::VisitTemplateTemplateParmDecl(), and clang::ASTDeclReader::VisitTemplateTemplateParmDecl().
| SourceRange clang::TemplateTemplateParmDecl::getSourceRange | ( | ) | const [inline, override, virtual] |
Source range that this declaration covers.
Reimplemented from clang::TemplateDecl.
Definition at line 1358 of file DeclTemplate.h.
References defaultArgumentWasInherited(), getDefaultArgument(), clang::SourceRange::getEnd(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateDecl::getTemplateParameters(), and hasDefaultArgument().
| bool clang::TemplateTemplateParmDecl::hasDefaultArgument | ( | ) | const [inline] |
Determine whether this template parameter has a default argument.
Definition at line 1326 of file DeclTemplate.h.
References clang::TemplateArgumentLoc::getArgument(), and clang::TemplateArgument::isNull().
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), AddTemplateParameterChunks(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateParameterList(), getSourceRange(), and clang::Sema::SubstDefaultTemplateArgumentIfAvailable().
| bool clang::TemplateTemplateParmDecl::isExpandedParameterPack | ( | ) | const [inline] |
Whether this parameter is a template template parameter pack that has a known list of different template parameter lists at different positions.
A parameter pack is an expanded parameter pack when the original parameter pack's template parameter list was itself a pack expansion, and that expansion has already been expanded. For exampe, given:
template<typename...Types> struct Outer { template<template<Types> class...Templates> struct Inner; };
The parameter pack Templates is a pack expansion, which expands the pack Types. When Types is supplied with template arguments by instantiating Outer, the instantiation of Templates is an expanded parameter pack.
Definition at line 1308 of file DeclTemplate.h.
Referenced by clang::Sema::CheckTemplateArgument(), getLVForTemplateParameterList(), clang::ASTDeclWriter::VisitTemplateTemplateParmDecl(), and clang::ASTDeclReader::VisitTemplateTemplateParmDecl().
| bool clang::TemplateTemplateParmDecl::isPackExpansion | ( | ) | const [inline] |
Whether this parameter pack is a pack expansion.
A template template parameter pack is a pack expansion if its template parameter list contains an unexpanded parameter pack.
Definition at line 1285 of file DeclTemplate.h.
References clang::TemplateParameterList::containsUnexpandedParameterPack(), and clang::TemplateDecl::getTemplateParameters().
Referenced by clang::Sema::CheckTemplateParameterList().
| bool clang::TemplateTemplateParmDecl::isParameterPack | ( | ) | const [inline] |
Whether this template template parameter is a template parameter pack.
template<template <class T> ...MetaFunctions> struct Apply;
Reimplemented from clang::Decl.
Definition at line 1279 of file DeclTemplate.h.
Referenced by clang::Sema::CheckTemplateParameterList(), DiagnoseUnexpandedParameterPacks(), GenerateInjectedTemplateArgs(), isSameTemplateParameter(), IsStructurallyEquivalent(), clang::ASTDeclWriter::VisitTemplateTemplateParmDecl(), and clang::ASTNodeImporter::VisitTemplateTemplateParmDecl().
| void clang::TemplateTemplateParmDecl::removeDefaultArgument | ( | ) | [inline] |
Removes the default argument of this template parameter.
Definition at line 1353 of file DeclTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), and clang::Sema::CheckTemplateParameterList().
| void clang::TemplateTemplateParmDecl::setDefaultArgument | ( | const TemplateArgumentLoc & | DefArg, |
| bool | Inherited | ||
| ) | [inline] |
Set the default argument for this template parameter, and whether that default argument was inherited from another declaration.
Definition at line 1347 of file DeclTemplate.h.
Referenced by clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::CheckTemplateParameterList(), and clang::ASTDeclReader::VisitTemplateTemplateParmDecl().
friend class ASTDeclReader [friend] |
Reimplemented from clang::Decl.
Definition at line 1369 of file DeclTemplate.h.
friend class ASTDeclWriter [friend] |
Reimplemented from clang::Decl.
Definition at line 1370 of file DeclTemplate.h.