clang 22.0.0git
|
Represents the parsed form of a C++ template argument. More...
#include "clang/Sema/ParsedTemplate.h"
Public Types | |
enum | KindType { Type , NonType , Template } |
Describes the kind of template argument that was parsed. More... |
Public Member Functions | |
ParsedTemplateArgument () | |
Build an empty template argument. | |
ParsedTemplateArgument (KindType Kind, void *Arg, SourceLocation NameLoc) | |
Create a template type argument or non-type template argument. | |
ParsedTemplateArgument (SourceLocation TemplateKwLoc, const CXXScopeSpec &SS, ParsedTemplateTy Template, SourceLocation NameLoc) | |
Create a template template argument. | |
bool | isInvalid () const |
Determine whether the given template argument is invalid. | |
KindType | getKind () const |
Determine what kind of template argument we have. | |
ParsedType | getAsType () const |
Retrieve the template type argument's type. | |
Expr * | getAsExpr () const |
Retrieve the non-type template argument's expression. | |
ParsedTemplateTy | getAsTemplate () const |
Retrieve the template template argument's template name. | |
SourceLocation | getTemplateKwLoc () const |
Retrieve the location of the template argument. | |
SourceLocation | getNameLoc () const |
Retrieve the location of the template argument. | |
const CXXScopeSpec & | getScopeSpec () const |
Retrieve the nested-name-specifier that precedes the template name in a template template argument. | |
SourceLocation | getEllipsisLoc () const |
Retrieve the location of the ellipsis that makes a template template argument into a pack expansion. | |
ParsedTemplateArgument | getTemplatePackExpansion (SourceLocation EllipsisLoc) const |
Retrieve a pack expansion of the given template template argument. |
Represents the parsed form of a C++ template argument.
Definition at line 30 of file ParsedTemplate.h.
Describes the kind of template argument that was parsed.
Enumerator | |
---|---|
Type | A template type parameter, stored as a type. |
NonType | A non-type template parameter, stored as an expression. |
Template | A template template argument, stored as a template name. |
Definition at line 33 of file ParsedTemplate.h.
|
inline |
Build an empty template argument.
This template argument is invalid.
Definition at line 45 of file ParsedTemplate.h.
References clang::nullptr, and Type.
Referenced by getTemplatePackExpansion(), and ParsedTemplateArgument().
|
inline |
Create a template type argument or non-type template argument.
Arg | the template type argument or non-type template argument. |
Loc | the location of the type. |
Definition at line 51 of file ParsedTemplate.h.
|
inline |
Create a template template argument.
SS | the C++ scope specifier that precedes the template name, if any. |
Template | the template to which this template template argument refers. |
TemplateLoc | the location of the template name. |
Definition at line 63 of file ParsedTemplate.h.
References ParsedTemplateArgument(), and Template.
|
inline |
Retrieve the non-type template argument's expression.
Definition at line 82 of file ParsedTemplate.h.
References NonType.
Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().
|
inline |
Retrieve the template template argument's template name.
Definition at line 88 of file ParsedTemplate.h.
References clang::OpaquePtr< TemplateName >::getFromOpaquePtr(), and Template.
Referenced by clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnTemplateTemplateArgument(), getTemplatePackExpansion(), and translateTemplateArgument().
|
inline |
Retrieve the template type argument's type.
Definition at line 76 of file ParsedTemplate.h.
References clang::OpaquePtr< QualType >::getFromOpaquePtr(), and Type.
Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().
|
inline |
Retrieve the location of the ellipsis that makes a template template argument into a pack expansion.
Definition at line 109 of file ParsedTemplate.h.
References Template.
Referenced by translateTemplateArgument().
|
inline |
Determine what kind of template argument we have.
Definition at line 73 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnPackExpansion(), argMatchesTemplateParams(), and translateTemplateArgument().
|
inline |
Retrieve the location of the template argument.
Definition at line 97 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnTemplateTemplateArgument(), and translateTemplateArgument().
|
inline |
Retrieve the nested-name-specifier that precedes the template name in a template template argument.
Definition at line 101 of file ParsedTemplate.h.
References Template.
Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().
|
inline |
Retrieve the location of the template argument.
Definition at line 94 of file ParsedTemplate.h.
Referenced by translateTemplateArgument().
ParsedTemplateArgument ParsedTemplateArgument::getTemplatePackExpansion | ( | SourceLocation | EllipsisLoc | ) | const |
Retrieve a pack expansion of the given template template argument.
EllipsisLoc | The location of the ellipsis. |
Definition at line 903 of file SemaTemplate.cpp.
References getAsTemplate(), ParsedTemplateArgument(), clang::Result, and Template.
Referenced by clang::Sema::ActOnPackExpansion().
|
inline |
Determine whether the given template argument is invalid.
Definition at line 70 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnPackExpansion(), and clang::Sema::ActOnTemplateTemplateArgument().