21 #include "llvm/Support/raw_ostream.h"
22 using namespace clang;
37 ID.AddPointer(parameter);
50 ID.AddPointer(Parameter);
55 Storage = StorageType::getFromOpaqueValue(Ptr);
92 return QTN->getTemplateDecl();
95 return sub->getReplacement().getAsTemplateDecl();
136 if (isa<TemplateTemplateParmDecl>(
Template))
142 return Template->getDeclContext() &&
143 Template->getDeclContext()->isDependentContext();
147 "overloaded templates shouldn't survive to here");
154 if (QTN->getQualifier()->isInstantiationDependent())
164 = dyn_cast<TemplateTemplateParmDecl>(
Template))
165 return TTP->isParameterPack();
171 return DTN->getQualifier() &&
172 DTN->getQualifier()->containsUnexpandedParameterPack();
179 bool SuppressNNS)
const {
184 QTN->getQualifier()->print(OS, Policy);
185 if (QTN->hasTemplateKeyword())
187 OS << *QTN->getDecl();
189 if (!SuppressNNS && DTN->getQualifier())
190 DTN->getQualifier()->print(OS, Policy);
193 if (DTN->isIdentifier())
194 OS << DTN->getIdentifier()->getName();
199 subst->getReplacement().print(OS, Policy, SuppressNNS);
202 OS << *SubstPack->getParameterPack();
205 (*OTS->
begin())->printName(OS);
212 raw_string_ostream OS(NameStr);
220 return DB << NameStr;
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool SuppressNNS=false) const
Print the template name.
TemplateDecl * getAsTemplateDecl() const
Retrieve the underlying template declaration that this template name refers to, if known...
Defines the C++ template declaration subclasses.
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
A template template parameter that has been substituted for some other template name.
void Profile(llvm::FoldingSetNodeID &ID, ASTContext &Context)
Describes how types, statements, expressions, and declarations should be printed. ...
OverloadedTemplateStorage * getAsOverloadedTemplate() const
Retrieve the underlying, overloaded function template.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Represents a dependent template name that cannot be resolved prior to template instantiation.
SubstTemplateTemplateParmStorage * getAsSubstTemplateTemplateParm()
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
A qualified template name, where the qualification is kept to describe the source code as written...
TemplateArgument getArgumentPack() const
Retrieve the template template argument pack with which this parameter was substituted.
QualifiedTemplateName * getAsQualifiedTemplateName() const
Retrieve the underlying qualified template name structure, if any.
SubstTemplateTemplateParmPackStorage * getAsSubstTemplateTemplateParmPack()
A little helper class used to produce diagnostics.
bool containsUnexpandedParameterPack() const
Determines whether this template name contains an unexpanded parameter pack (for C++0x variadic templ...
A dependent template name that has not been resolved to a template (or set of templates).
Defines the clang::LangOptions interface.
bool isInstantiationDependent() const
Determines whether this is a template name that somehow depends on a template parameter.
void Profile(llvm::FoldingSetNodeID &ID)
A structure for storing the information associated with a substituted template template parameter...
SubstTemplateTemplateParmPackStorage * getAsSubstTemplateTemplateParmPack() const
Retrieve the substituted template template parameter pack, if known.
Represents a C++ template name within the type system.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
A template template parameter pack that has been substituted for a template template argument pack...
OverloadedTemplateStorage * getAsOverloadedStorage()
A structure for storing an already-substituted template template parameter pack.
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Ctx)
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) const
Used to insert TemplateArguments into FoldingSets.
SubstTemplateTemplateParmStorage * getAsSubstTemplateTemplateParm() const
Retrieve the substituted template template parameter, if known.
Represents a template argument.
Represents a template name that was expressed as a qualified name.
void * getAsVoidPointer() const
Retrieve the template name as a void pointer.
The base class of all kinds of template declarations (e.g., class, function, etc.).
bool isDependent() const
Determines whether this is a dependent template name.
Defines the Diagnostic-related interfaces.
const char * getOperatorSpelling(OverloadedOperatorKind Operator)
Retrieve the spelling of the given overloaded operator, without the preceding "operator" keyword...
bool isNull() const
Determine whether this template name is NULL.
DependentTemplateName * getAsDependentTemplateName() const
Retrieve the underlying dependent template name structure, if any.
The parameter type of a method or function.
A structure for storing the information associated with an overloaded template name.
A set of overloaded template declarations.
void dump() const
Debugging aid that dumps the template name to standard error.
Implementation class used to describe either a set of overloaded template names or an already-substit...
A single template declaration.