clang 20.0.0git
|
Information about a template-id annotation token. More...
#include "clang/Sema/ParsedTemplate.h"
Public Member Functions | |
ParsedTemplateArgument * | getTemplateArgs () |
Retrieves a pointer to the template arguments. | |
void | Destroy () |
bool | mightBeType () const |
Determine whether this might be a type template. | |
bool | hasInvalidName () const |
bool | hasInvalidArgs () const |
bool | isInvalid () const |
Static Public Member Functions | |
static TemplateIdAnnotation * | Create (SourceLocation TemplateKWLoc, SourceLocation TemplateNameLoc, const IdentifierInfo *Name, OverloadedOperatorKind OperatorKind, ParsedTemplateTy OpaqueTemplateName, TemplateNameKind TemplateKind, SourceLocation LAngleLoc, SourceLocation RAngleLoc, ArrayRef< ParsedTemplateArgument > TemplateArgs, bool ArgsInvalid, SmallVectorImpl< TemplateIdAnnotation * > &CleanupList) |
Creates a new TemplateIdAnnotation with NumArgs arguments and appends it to List. | |
Public Attributes | |
friend | TrailingObjects |
SourceLocation | TemplateKWLoc |
TemplateKWLoc - The location of the template keyword. | |
SourceLocation | TemplateNameLoc |
TemplateNameLoc - The location of the template name within the source. | |
const IdentifierInfo * | Name |
FIXME: Temporarily stores the name of a specialization. | |
OverloadedOperatorKind | Operator |
FIXME: Temporarily stores the overloaded operator kind. | |
ParsedTemplateTy | Template |
The declaration of the template corresponding to the template-name. | |
TemplateNameKind | Kind |
The kind of template that Template refers to. | |
SourceLocation | LAngleLoc |
The location of the '<' before the template argument list. | |
SourceLocation | RAngleLoc |
The location of the '>' after the template argument list. | |
unsigned | NumArgs |
NumArgs - The number of template arguments. | |
bool | ArgsInvalid |
Whether an error was encountered in the template arguments. | |
Information about a template-id annotation token.
A template-id annotation token contains the template name, template arguments, and the source locations for important tokens. All of the information about template arguments is allocated directly after this structure. A template-id annotation token can also be generated by a type-constraint construct with no explicit template arguments, e.g. "template<C T>" would annotate C as a TemplateIdAnnotation with no template arguments (the angle locations would be invalid in this case).
Definition at line 149 of file ParsedTemplate.h.
|
inlinestatic |
Creates a new TemplateIdAnnotation with NumArgs arguments and appends it to List.
Definition at line 199 of file ParsedTemplate.h.
References ArgsInvalid, LAngleLoc, Name, RAngleLoc, TemplateKWLoc, and TemplateNameLoc.
|
inline |
Definition at line 214 of file ParsedTemplate.h.
References getTemplateArgs(), and NumArgs.
|
inline |
Retrieves a pointer to the template arguments.
Definition at line 192 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), Destroy(), InventTemplateParameter(), makeTemplateArgumentListInfo(), and clang::Parser::TryAnnotateTypeOrScopeToken().
|
inline |
|
inline |
Definition at line 230 of file ParsedTemplate.h.
References Kind, and clang::TNK_Non_template.
Referenced by isInvalid().
|
inline |
Definition at line 233 of file ParsedTemplate.h.
References hasInvalidArgs(), and hasInvalidName().
Referenced by clang::Parser::ParseUnqualifiedId(), clang::UnqualifiedId::setConstructorTemplateId(), clang::UnqualifiedId::setTemplateId(), and clang::Parser::TryAnnotateTypeOrScopeToken().
|
inline |
Determine whether this might be a type template.
Definition at line 223 of file ParsedTemplate.h.
References Kind, clang::TNK_Dependent_template_name, clang::TNK_Non_template, clang::TNK_Type_template, and clang::TNK_Undeclared_template.
Referenced by clang::Parser::TryAnnotateTypeOrScopeToken().
bool clang::TemplateIdAnnotation::ArgsInvalid |
Whether an error was encountered in the template arguments.
If so, NumArgs and the trailing arguments are best-effort.
Definition at line 189 of file ParsedTemplate.h.
Referenced by Create(), and hasInvalidArgs().
TemplateNameKind clang::TemplateIdAnnotation::Kind |
The kind of template that Template refers to.
If this is TNK_Non_template, an error was encountered and diagnosed when parsing or looking up the template name.
Definition at line 174 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnDecompositionDeclarator(), hasInvalidName(), mightBeType(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().
SourceLocation clang::TemplateIdAnnotation::LAngleLoc |
The location of the '<' before the template argument list.
Definition at line 178 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::BuildTypeConstraint(), clang::Sema::CheckTypeConstraint(), Create(), InventTemplateParameter(), makeTemplateArgumentListInfo(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::Parser::ParseUnqualifiedId(), and clang::Parser::TryAnnotateTypeOrScopeToken().
const IdentifierInfo* clang::TemplateIdAnnotation::Name |
FIXME: Temporarily stores the name of a specialization.
Definition at line 162 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), clang::Sema::BuildTypeConstraint(), Create(), InventTemplateParameter(), clang::Parser::ParseUnqualifiedId(), and clang::Parser::TryAnnotateTypeOrScopeToken().
unsigned clang::TemplateIdAnnotation::NumArgs |
NumArgs - The number of template arguments.
Definition at line 185 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), Destroy(), InventTemplateParameter(), makeTemplateArgumentListInfo(), and clang::Parser::TryAnnotateTypeOrScopeToken().
OverloadedOperatorKind clang::TemplateIdAnnotation::Operator |
FIXME: Temporarily stores the overloaded operator kind.
Definition at line 165 of file ParsedTemplate.h.
SourceLocation clang::TemplateIdAnnotation::RAngleLoc |
The location of the '>' after the template argument list.
Definition at line 182 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), clang::Sema::ActOnVarTemplateSpecialization(), Create(), InventTemplateParameter(), makeTemplateArgumentListInfo(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::Parser::ParseUnqualifiedId(), clang::UnqualifiedId::setConstructorTemplateId(), clang::UnqualifiedId::setTemplateId(), and clang::Parser::TryAnnotateTypeOrScopeToken().
ParsedTemplateTy clang::TemplateIdAnnotation::Template |
The declaration of the template corresponding to the template-name.
Definition at line 169 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::BuildTypeConstraint(), clang::Sema::CheckTypeConstraint(), InventTemplateParameter(), and clang::Parser::TryAnnotateTypeOrScopeToken().
SourceLocation clang::TemplateIdAnnotation::TemplateKWLoc |
TemplateKWLoc - The location of the template keyword.
For e.g. typename T::template Y
Definition at line 155 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), Create(), clang::Sema::diagnoseQualifiedDeclaration(), clang::Parser::ParseUnqualifiedId(), and clang::Parser::TryAnnotateTypeOrScopeToken().
SourceLocation clang::TemplateIdAnnotation::TemplateNameLoc |
TemplateNameLoc - The location of the template name within the source.
Definition at line 159 of file ParsedTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTypeRequirement(), clang::Sema::BuildTypeConstraint(), clang::Sema::CheckTypeConstraint(), Create(), InventTemplateParameter(), clang::Parser::ParseUnqualifiedId(), clang::UnqualifiedId::setConstructorTemplateId(), clang::UnqualifiedId::setTemplateId(), and clang::Parser::TryAnnotateTypeOrScopeToken().
friend clang::TemplateIdAnnotation::TrailingObjects |
Definition at line 152 of file ParsedTemplate.h.