14 #ifndef LLVM_CLANG_SEMA_PARSEDTEMPLATE_H
15 #define LLVM_CLANG_SEMA_PARSEDTEMPLATE_H
45 : Kind(Kind), Arg(Arg), Loc(Loc) { }
60 Arg(Template.getAsOpaquePtr()),
61 SS(SS), Loc(TemplateLoc), EllipsisLoc() { }
71 assert(
Kind ==
Type &&
"Not a template type argument");
77 assert(
Kind ==
NonType &&
"Not a non-type template argument");
78 return static_cast<Expr*
>(Arg);
83 assert(
Kind ==
Template &&
"Not a template template argument");
94 "Only template template arguments can have a scope specifier");
102 "Only template template arguments can have an ellipsis");
196 for (
unsigned I = 0; I !=
NumArgs; ++I)
199 List.push_back(TemplateId);
IdentifierInfo * Name
FIXME: Temporarily stores the name of a specialization.
SourceLocation TemplateNameLoc
ParsedType getAsType() const
Retrieve the template type argument's type.
TemplateNameKind Kind
The kind of template that Template refers to.
SourceLocation getLocation() const
Retrieve the location of the template argument.
Information about a template-id annotation token.
A non-type template parameter, stored as an expression.
ParsedTemplateTy getAsTemplate() const
Retrieve the template template argument's template name.
KindType getKind() const
Determine what kind of template argument we have.
ParsedTemplateArgument * getTemplateArgs()
Retrieves a pointer to the template arguments.
Represents a C++ nested-name-specifier or a global scope specifier.
ParsedTemplateArgument getTemplatePackExpansion(SourceLocation EllipsisLoc) const
Retrieve a pack expansion of the given template template argument.
SourceLocation TemplateKWLoc
ParsedTemplateArgument(const CXXScopeSpec &SS, ParsedTemplateTy Template, SourceLocation TemplateLoc)
Create a template template argument.
KindType
Describes the kind of template argument that was parsed.
ParsedTemplateArgument(KindType Kind, void *Arg, SourceLocation Loc)
Create a template type argument or non-type template argument.
This file defines the classes used to store parsed information about declaration-specifiers and decla...
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that makes a template template argument into a pack expansion...
TemplateNameKind
Specifies the kind of template name that an identifier refers to. Be careful when changing this: this...
ParsedTemplateArgument()
Build an empty template argument.
Represents the parsed form of a C++ template argument.
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
Expr * getAsExpr() const
Retrieve the non-type template argument's expression.
A template type parameter, stored as a type.
const CXXScopeSpec & getScopeSpec() const
Retrieve the nested-name-specifier that precedes the template name in a template template argument...
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
CXXScopeSpec SS
The nested-name-specifier that precedes the template name.
OverloadedOperatorKind Operator
FIXME: Temporarily stores the overloaded operator kind.
bool isInvalid() const
Determine whether the given template argument is invalid.
SourceRange getTemplateParamsRange(TemplateParameterList const *const *Params, unsigned NumParams)
Retrieves the range of the given template parameter lists.
static TemplateIdAnnotation * Allocate(unsigned NumArgs, SmallVectorImpl< TemplateIdAnnotation * > &List)
Creates a new TemplateIdAnnotation with NumArgs arguments and appends it to List. ...
A template template argument, stored as a template name.
unsigned NumArgs
NumArgs - The number of template arguments.
static OpaquePtr getFromOpaquePtr(void *P)
ParsedTemplateTy Template