clang 20.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 | |
void | initializeFrom (SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray) |
void | initializeFrom (SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray, TemplateArgumentDependence &Deps) |
void | initializeFrom (SourceLocation TemplateKWLoc) |
void | copyInto (const TemplateArgumentLoc *ArgArray, TemplateArgumentListInfo &List) const |
Public Attributes | |
SourceLocation | LAngleLoc |
The source location of the left angle bracket ('<'). | |
SourceLocation | RAngleLoc |
The source location of the right angle bracket ('>'). | |
SourceLocation | TemplateKWLoc |
The source location of the template keyword; this is used as part of the representation of qualified identifiers, such as S<T>::template apply<T>. | |
unsigned | NumTemplateArgs |
The number of template arguments in TemplateArgs. | |
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
It is intended to be used as a trailing object on AST nodes, and as such, doesn't contain the array of TemplateArgumentLoc itself, but expects the containing object to also provide storage for that.
Definition at line 728 of file TemplateBase.h.
void ASTTemplateKWAndArgsInfo::copyInto | ( | const TemplateArgumentLoc * | ArgArray, |
TemplateArgumentListInfo & | List | ||
) | const |
Definition at line 785 of file TemplateBase.cpp.
References clang::TemplateArgumentListInfo::addArgument(), LAngleLoc, NumTemplateArgs, RAngleLoc, clang::TemplateArgumentListInfo::setLAngleLoc(), and clang::TemplateArgumentListInfo::setRAngleLoc().
Referenced by clang::OverloadExpr::copyTemplateArgumentsInto().
void ASTTemplateKWAndArgsInfo::initializeFrom | ( | SourceLocation | TemplateKWLoc | ) |
Definition at line 762 of file TemplateBase.cpp.
References clang::SourceLocation::isValid(), LAngleLoc, NumTemplateArgs, RAngleLoc, and TemplateKWLoc.
void ASTTemplateKWAndArgsInfo::initializeFrom | ( | SourceLocation | TemplateKWLoc, |
const TemplateArgumentListInfo & | List, | ||
TemplateArgumentLoc * | OutArgArray | ||
) |
Definition at line 750 of file TemplateBase.cpp.
References clang::TemplateArgumentListInfo::getLAngleLoc(), clang::TemplateArgumentListInfo::getRAngleLoc(), LAngleLoc, NumTemplateArgs, RAngleLoc, clang::TemplateArgumentListInfo::size(), and TemplateKWLoc.
Referenced by clang::OverloadExpr::OverloadExpr(), and clang::ASTStmtReader::ReadTemplateKWAndArgsInfo().
void ASTTemplateKWAndArgsInfo::initializeFrom | ( | SourceLocation | TemplateKWLoc, |
const TemplateArgumentListInfo & | List, | ||
TemplateArgumentLoc * | OutArgArray, | ||
TemplateArgumentDependence & | Deps | ||
) |
Definition at line 770 of file TemplateBase.cpp.
References clang::TemplateArgumentListInfo::getLAngleLoc(), clang::TemplateArgumentListInfo::getRAngleLoc(), LAngleLoc, NumTemplateArgs, RAngleLoc, clang::TemplateArgumentListInfo::size(), and TemplateKWLoc.
SourceLocation clang::ASTTemplateKWAndArgsInfo::LAngleLoc |
The source location of the left angle bracket ('<').
Definition at line 730 of file TemplateBase.h.
Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), clang::OverloadExpr::getLAngleLoc(), and initializeFrom().
unsigned clang::ASTTemplateKWAndArgsInfo::NumTemplateArgs |
The number of template arguments in TemplateArgs.
Definition at line 742 of file TemplateBase.h.
Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), clang::OverloadExpr::getNumTemplateArgs(), and initializeFrom().
SourceLocation clang::ASTTemplateKWAndArgsInfo::RAngleLoc |
The source location of the right angle bracket ('>').
Definition at line 733 of file TemplateBase.h.
Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), clang::OverloadExpr::getRAngleLoc(), and initializeFrom().
SourceLocation clang::ASTTemplateKWAndArgsInfo::TemplateKWLoc |
The source location of the template keyword; this is used as part of the representation of qualified identifiers, such as S<T>::template apply<T>.
Will be empty if this expression does not have a template keyword.
Definition at line 739 of file TemplateBase.h.
Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), clang::OverloadExpr::getTemplateKeywordLoc(), and initializeFrom().