clang 22.0.0git
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:
[legend]

Public Member Functions

SourceLocation getLAngleLoc () const
SourceLocation getRAngleLoc () const
const TemplateArgumentLocgetTemplateArgs () const
 Retrieve the template arguments.
unsigned getNumTemplateArgs () const
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 676 of file TemplateBase.h.

Member Function Documentation

◆ arguments()

◆ Create() [1/2]

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

Definition at line 748 of file TemplateBase.cpp.

References clang::C, and getNumTemplateArgs().

◆ Create() [2/2]

◆ getLAngleLoc()

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

Definition at line 698 of file TemplateBase.h.

References LAngleLoc.

Referenced by substituteParameterMappings().

◆ getNumTemplateArgs()

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

Definition at line 705 of file TemplateBase.h.

References NumTemplateArgs.

Referenced by arguments(), and Create().

◆ getRAngleLoc()

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

Definition at line 699 of file TemplateBase.h.

References RAngleLoc.

Referenced by clang::ConceptReference::getEndLoc(), and substituteParameterMappings().

◆ getTemplateArgs()

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

Retrieve the template arguments.

Definition at line 702 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 711 of file TemplateBase.h.

References getTemplateArgs().

◆ ASTNodeImporter

friend class ASTNodeImporter
friend

Definition at line 680 of file TemplateBase.h.

References ASTNodeImporter.

Referenced by ASTNodeImporter.

Member Data Documentation

◆ LAngleLoc

◆ NumTemplateArgs

unsigned clang::ASTTemplateArgumentListInfo::NumTemplateArgs

◆ RAngleLoc


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