clang 17.0.0git
|
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>". More...
#include "clang/AST/TemplateBase.h"
Public Member Functions | |
SourceLocation | getLAngleLoc () const |
SourceLocation | getRAngleLoc () const |
const TemplateArgumentLoc * | getTemplateArgs () const |
Retrieve the template arguments. | |
unsigned | getNumTemplateArgs () const |
llvm::ArrayRef< TemplateArgumentLoc > | arguments () const |
const TemplateArgumentLoc & | operator[] (unsigned I) const |
Static Public Member Functions | |
static const ASTTemplateArgumentListInfo * | Create (const ASTContext &C, const TemplateArgumentListInfo &List) |
static const ASTTemplateArgumentListInfo * | Create (const ASTContext &C, const ASTTemplateArgumentListInfo *List) |
Public Attributes | |
SourceLocation | LAngleLoc |
The source location of the left angle bracket ('<'). | |
SourceLocation | RAngleLoc |
The source location of the right angle bracket ('>'). | |
unsigned | NumTemplateArgs |
The number of template arguments in TemplateArgs. | |
Friends | |
class | ASTNodeImporter |
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
This is safe to be used inside an AST node, in contrast with TemplateArgumentListInfo.
Definition at line 639 of file TemplateBase.h.
|
inline |
Definition at line 670 of file TemplateBase.h.
References getNumTemplateArgs(), and getTemplateArgs().
Referenced by clang::computeDependence(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::dumpASTTemplateArgumentListInfo(), FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::TypeConstraint::print(), substituteParameterMappings(), clang::Sema::SubstTypeConstraint(), and clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitConceptSpecializationExpr().
|
static |
Definition at line 612 of file TemplateBase.cpp.
References clang::C.
|
static |
Definition at line 604 of file TemplateBase.cpp.
References clang::C.
Referenced by clang::Sema::AttachTypeConstraint(), clang::Sema::CheckConceptTemplateId(), clang::ClassScopeFunctionSpecializationDecl::Create(), clang::FunctionTemplateSpecializationInfo::Create(), clang::VarTemplatePartialSpecializationDecl::Create(), clang::ClassTemplatePartialSpecializationDecl::Create(), clang::ASTRecordReader::readASTTemplateArgumentListInfo(), clang::VarTemplateSpecializationDecl::setTemplateArgsInfo(), and clang::ASTNodeImporter::VisitTemplateTypeParmDecl().
|
inline |
Definition at line 661 of file TemplateBase.h.
References LAngleLoc.
|
inline |
Definition at line 668 of file TemplateBase.h.
References NumTemplateArgs.
Referenced by arguments().
|
inline |
Definition at line 662 of file TemplateBase.h.
References RAngleLoc.
|
inline |
Retrieve the template arguments.
Definition at line 665 of file TemplateBase.h.
Referenced by clang::ASTRecordWriter::AddASTTemplateArgumentListInfo(), arguments(), and operator[]().
|
inline |
Definition at line 674 of file TemplateBase.h.
References getTemplateArgs().
|
friend |
Definition at line 643 of file TemplateBase.h.
SourceLocation clang::ASTTemplateArgumentListInfo::LAngleLoc |
The source location of the left angle bracket ('<').
Definition at line 653 of file TemplateBase.h.
Referenced by clang::ASTRecordWriter::AddASTTemplateArgumentListInfo(), FinishTemplateArgumentDeduction(), getLAngleLoc(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::Sema::SubstTypeConstraint(), and clang::ASTDeclWriter::VisitFunctionDecl().
unsigned clang::ASTTemplateArgumentListInfo::NumTemplateArgs |
The number of template arguments in TemplateArgs.
Definition at line 659 of file TemplateBase.h.
Referenced by clang::ASTRecordWriter::AddASTTemplateArgumentListInfo(), diagnoseUnsatisfiedRequirement(), getNumTemplateArgs(), clang::ASTContext::isSameTypeConstraint(), substituteParameterMappings(), and clang::ASTDeclWriter::VisitFunctionDecl().
SourceLocation clang::ASTTemplateArgumentListInfo::RAngleLoc |
The source location of the right angle bracket ('>').
Definition at line 656 of file TemplateBase.h.
Referenced by clang::ASTRecordWriter::AddASTTemplateArgumentListInfo(), FinishTemplateArgumentDeduction(), clang::ConceptSpecializationExpr::getEndLoc(), getRAngleLoc(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::Sema::SubstTypeConstraint(), and clang::ASTDeclWriter::VisitFunctionDecl().