clang  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::ASTTemplateKWAndArgsInfo Struct Reference

Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>". More...

#include "clang/AST/TemplateBase.h"

Collaboration diagram for clang::ASTTemplateKWAndArgsInfo:
Collaboration graph
[legend]

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 ('<'). More...
 
SourceLocation RAngleLoc
 The source location of the right angle bracket ('>'). More...
 
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>. More...
 
unsigned NumTemplateArgs
 The number of template arguments in TemplateArgs. More...
 

Detailed Description

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 660 of file TemplateBase.h.

Member Function Documentation

◆ copyInto()

void ASTTemplateKWAndArgsInfo::copyInto ( const TemplateArgumentLoc ArgArray,
TemplateArgumentListInfo List 
) const

◆ initializeFrom() [1/3]

void ASTTemplateKWAndArgsInfo::initializeFrom ( SourceLocation  TemplateKWLoc)

◆ initializeFrom() [2/3]

void ASTTemplateKWAndArgsInfo::initializeFrom ( SourceLocation  TemplateKWLoc,
const TemplateArgumentListInfo List,
TemplateArgumentLoc OutArgArray 
)

◆ initializeFrom() [3/3]

void ASTTemplateKWAndArgsInfo::initializeFrom ( SourceLocation  TemplateKWLoc,
const TemplateArgumentListInfo List,
TemplateArgumentLoc OutArgArray,
TemplateArgumentDependence &  Deps 
)

Member Data Documentation

◆ LAngleLoc

SourceLocation clang::ASTTemplateKWAndArgsInfo::LAngleLoc

The source location of the left angle bracket ('<').

Definition at line 662 of file TemplateBase.h.

Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), clang::OverloadExpr::getLAngleLoc(), and initializeFrom().

◆ NumTemplateArgs

unsigned clang::ASTTemplateKWAndArgsInfo::NumTemplateArgs

The number of template arguments in TemplateArgs.

Definition at line 674 of file TemplateBase.h.

Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), clang::OverloadExpr::getNumTemplateArgs(), and initializeFrom().

◆ RAngleLoc

SourceLocation clang::ASTTemplateKWAndArgsInfo::RAngleLoc

The source location of the right angle bracket ('>').

Definition at line 665 of file TemplateBase.h.

Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), clang::OverloadExpr::getRAngleLoc(), and initializeFrom().

◆ TemplateKWLoc

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 671 of file TemplateBase.h.

Referenced by clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), clang::OverloadExpr::getTemplateKeywordLoc(), and initializeFrom().


The documentation for this struct was generated from the following files: