clang  19.0.0git
Classes | Public Member Functions | Public Attributes | List of all members
CXXNameMangler::TemplateArgManglingInfo Struct Reference

Classes

struct  Info
 Information about how to mangle a template argument. More...
 

Public Member Functions

 TemplateArgManglingInfo (const CXXNameMangler &Mangler, TemplateName TN)
 
bool isOverloadable ()
 Determine whether the resolved template might be overloaded on its template parameter list. More...
 
bool needToMangleTemplateParam (const NamedDecl *Param, const TemplateArgument &Arg)
 Determine whether we need to prefix this <template-arg> mangling with a <template-param-decl>. More...
 
Info getArgInfo (unsigned ParamIdx, const TemplateArgument &Arg)
 Determine information about how this template argument should be mangled. More...
 
const ExprgetTrailingRequiresClauseToMangle ()
 Determine if we should mangle a requires-clause after the template argument list. More...
 

Public Attributes

const CXXNameMangler & Mangler
 
TemplateDeclResolvedTemplate = nullptr
 
bool SeenPackExpansionIntoNonPack = false
 
const NamedDeclUnresolvedExpandedPack = nullptr
 

Detailed Description

Definition at line 5839 of file ItaniumMangle.cpp.

Constructor & Destructor Documentation

◆ TemplateArgManglingInfo()

CXXNameMangler::TemplateArgManglingInfo::TemplateArgManglingInfo ( const CXXNameMangler &  Mangler,
TemplateName  TN 
)
inline

Definition at line 5845 of file ItaniumMangle.cpp.

References clang::TemplateName::getAsTemplateDecl().

Member Function Documentation

◆ getArgInfo()

Info CXXNameMangler::TemplateArgManglingInfo::getArgInfo ( unsigned  ParamIdx,
const TemplateArgument Arg 
)
inline

Determine information about how this template argument should be mangled.

This should be called exactly once for each parameter / argument pair, in order.

Definition at line 5942 of file ItaniumMangle.cpp.

References clang::TemplateArgument::getKind(), clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::TemplateArgument::isPackExpansion(), clang::Decl::isParameterPack(), and clang::TemplateArgument::Pack.

◆ getTrailingRequiresClauseToMangle()

const Expr* CXXNameMangler::TemplateArgManglingInfo::getTrailingRequiresClauseToMangle ( )
inline

Determine if we should mangle a requires-clause after the template argument list.

If so, returns the expression to mangle.

Definition at line 5995 of file ItaniumMangle.cpp.

References clang::TemplateParameterList::getRequiresClause(), and clang::TemplateDecl::getTemplateParameters().

◆ isOverloadable()

bool CXXNameMangler::TemplateArgManglingInfo::isOverloadable ( )
inline

Determine whether the resolved template might be overloaded on its template parameter list.

If so, the mangling needs to include enough information to reconstruct the template parameter list.

Definition at line 5863 of file ItaniumMangle.cpp.

◆ needToMangleTemplateParam()

bool CXXNameMangler::TemplateArgManglingInfo::needToMangleTemplateParam ( const NamedDecl Param,
const TemplateArgument Arg 
)
inline

Determine whether we need to prefix this <template-arg> mangling with a <template-param-decl>.

This happens if the natural template parameter for the argument mangling is not the same as the actual template parameter.

Definition at line 5880 of file ItaniumMangle.cpp.

References clang::TemplateName::getAsTemplateDecl(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateParameterList::getDepth(), clang::TemplateArgument::getKind(), clang::TemplateDecl::getTemplateParameters(), clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), and clang::TemplateArgument::pack_size().

Member Data Documentation

◆ Mangler

const CXXNameMangler& CXXNameMangler::TemplateArgManglingInfo::Mangler

Definition at line 5840 of file ItaniumMangle.cpp.

◆ ResolvedTemplate

TemplateDecl* CXXNameMangler::TemplateArgManglingInfo::ResolvedTemplate = nullptr

Definition at line 5841 of file ItaniumMangle.cpp.

◆ SeenPackExpansionIntoNonPack

bool CXXNameMangler::TemplateArgManglingInfo::SeenPackExpansionIntoNonPack = false

Definition at line 5842 of file ItaniumMangle.cpp.

◆ UnresolvedExpandedPack

const NamedDecl* CXXNameMangler::TemplateArgManglingInfo::UnresolvedExpandedPack = nullptr

Definition at line 5843 of file ItaniumMangle.cpp.


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