clang 17.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
clang::ASTTemplateArgumentListInfo Struct Referencefinal

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

#include "clang/AST/TemplateBase.h"

Inheritance diagram for clang::ASTTemplateArgumentListInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::ASTTemplateArgumentListInfo:
Collaboration graph
[legend]

Public Member Functions

SourceLocation getLAngleLoc () const
 
SourceLocation getRAngleLoc () const
 
const TemplateArgumentLocgetTemplateArgs () const
 Retrieve the template arguments.
 
unsigned getNumTemplateArgs () const
 
llvm::ArrayRef< TemplateArgumentLocarguments () const
 
const TemplateArgumentLocoperator[] (unsigned I) const
 

Static Public Member Functions

static const ASTTemplateArgumentListInfoCreate (const ASTContext &C, const TemplateArgumentListInfo &List)
 
static const ASTTemplateArgumentListInfoCreate (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
 

Detailed Description

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.

Member Function Documentation

◆ arguments()

llvm::ArrayRef< TemplateArgumentLoc > clang::ASTTemplateArgumentListInfo::arguments ( ) const
inline

◆ Create() [1/2]

const ASTTemplateArgumentListInfo * ASTTemplateArgumentListInfo::Create ( const ASTContext C,
const ASTTemplateArgumentListInfo List 
)
static

Definition at line 612 of file TemplateBase.cpp.

References clang::C.

◆ Create() [2/2]

const ASTTemplateArgumentListInfo * ASTTemplateArgumentListInfo::Create ( const ASTContext C,
const TemplateArgumentListInfo List 
)
static

◆ getLAngleLoc()

SourceLocation clang::ASTTemplateArgumentListInfo::getLAngleLoc ( ) const
inline

Definition at line 661 of file TemplateBase.h.

References LAngleLoc.

◆ getNumTemplateArgs()

unsigned clang::ASTTemplateArgumentListInfo::getNumTemplateArgs ( ) const
inline

Definition at line 668 of file TemplateBase.h.

References NumTemplateArgs.

Referenced by arguments().

◆ getRAngleLoc()

SourceLocation clang::ASTTemplateArgumentListInfo::getRAngleLoc ( ) const
inline

Definition at line 662 of file TemplateBase.h.

References RAngleLoc.

◆ getTemplateArgs()

const TemplateArgumentLoc * clang::ASTTemplateArgumentListInfo::getTemplateArgs ( ) const
inline

Retrieve the template arguments.

Definition at line 665 of file TemplateBase.h.

Referenced by clang::ASTRecordWriter::AddASTTemplateArgumentListInfo(), arguments(), and operator[]().

◆ operator[]()

const TemplateArgumentLoc & clang::ASTTemplateArgumentListInfo::operator[] ( unsigned  I) const
inline

Definition at line 674 of file TemplateBase.h.

References getTemplateArgs().

Friends And Related Function Documentation

◆ ASTNodeImporter

friend class ASTNodeImporter
friend

Definition at line 643 of file TemplateBase.h.

Member Data Documentation

◆ LAngleLoc

SourceLocation clang::ASTTemplateArgumentListInfo::LAngleLoc

◆ NumTemplateArgs

unsigned clang::ASTTemplateArgumentListInfo::NumTemplateArgs

◆ RAngleLoc

SourceLocation clang::ASTTemplateArgumentListInfo::RAngleLoc

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