clang 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::SubstTemplateTemplateParmPackStorage Class Reference

A structure for storing an already-substituted template template parameter pack. More...

#include "clang/AST/TemplateName.h"

Inheritance diagram for clang::SubstTemplateTemplateParmPackStorage:
Inheritance graph
[legend]

Public Member Functions

 SubstTemplateTemplateParmPackStorage (ArrayRef< TemplateArgument > ArgPack, Decl *AssociatedDecl, unsigned Index, bool Final)
 
DeclgetAssociatedDecl () const
 A template-like entity which owns the whole pattern being substituted.
 
unsigned getIndex () const
 Returns the index of the replaced parameter in the associated declaration.
 
bool getFinal () const
 
TemplateTemplateParmDeclgetParameterPack () const
 Retrieve the template template parameter pack being substituted.
 
TemplateArgument getArgumentPack () const
 Retrieve the template template argument pack with which this parameter was substituted.
 
void Profile (llvm::FoldingSetNodeID &ID, ASTContext &Context)
 
- Public Member Functions inherited from clang::UncommonTemplateNameStorage
OverloadedTemplateStoragegetAsOverloadedStorage ()
 
AssumedTemplateStoragegetAsAssumedTemplateName ()
 
SubstTemplateTemplateParmStoragegetAsSubstTemplateTemplateParm ()
 
SubstTemplateTemplateParmPackStoragegetAsSubstTemplateTemplateParmPack ()
 

Static Public Member Functions

static void Profile (llvm::FoldingSetNodeID &ID, ASTContext &Context, const TemplateArgument &ArgPack, Decl *AssociatedDecl, unsigned Index, bool Final)
 

Additional Inherited Members

- Protected Types inherited from clang::UncommonTemplateNameStorage
enum  Kind { Overloaded , Assumed , SubstTemplateTemplateParm , SubstTemplateTemplateParmPack }
 
- Protected Member Functions inherited from clang::UncommonTemplateNameStorage
 UncommonTemplateNameStorage (Kind Kind, unsigned Index, unsigned Data)
 
- Protected Attributes inherited from clang::UncommonTemplateNameStorage
union {
   struct BitsTag   Bits
 
   void *   PointerAlignment
 
}; 
 

Detailed Description

A structure for storing an already-substituted template template parameter pack.

This kind of template names occurs when the parameter pack has been provided with a template template argument pack in a context where its enclosing pack expansion could not be fully expanded.

Definition at line 140 of file TemplateName.h.

Constructor & Destructor Documentation

◆ SubstTemplateTemplateParmPackStorage()

SubstTemplateTemplateParmPackStorage::SubstTemplateTemplateParmPackStorage ( ArrayRef< TemplateArgument ArgPack,
Decl AssociatedDecl,
unsigned  Index,
bool  Final 
)

Definition at line 69 of file TemplateName.cpp.

Member Function Documentation

◆ getArgumentPack()

TemplateArgument SubstTemplateTemplateParmPackStorage::getArgumentPack ( ) const

Retrieve the template template argument pack with which this parameter was substituted.

Definition at line 38 of file TemplateName.cpp.

References clang::UncommonTemplateNameStorage::Bits, and clang::UncommonTemplateNameStorage::BitsTag::Data.

Referenced by clang::ASTContext::getCanonicalTemplateName(), clang::ASTImporter::Import(), IsStructurallyEquivalent(), and Profile().

◆ getAssociatedDecl()

Decl * SubstTemplateTemplateParmPackStorage::getAssociatedDecl ( ) const

A template-like entity which owns the whole pattern being substituted.

This will own a set of template parameters.

Definition at line 84 of file TemplateName.cpp.

Referenced by clang::ASTContext::getCanonicalTemplateName(), getParameterPack(), clang::ASTImporter::Import(), IsStructurallyEquivalent(), and Profile().

◆ getFinal()

bool SubstTemplateTemplateParmPackStorage::getFinal ( ) const

◆ getIndex()

unsigned clang::SubstTemplateTemplateParmPackStorage::getIndex ( ) const
inline

Returns the index of the replaced parameter in the associated declaration.

This should match the result of getParameterPack()->getIndex().

Definition at line 156 of file TemplateName.h.

Referenced by clang::ASTContext::getCanonicalTemplateName(), clang::ASTImporter::Import(), IsStructurallyEquivalent(), and Profile().

◆ getParameterPack()

TemplateTemplateParmDecl * SubstTemplateTemplateParmPackStorage::getParameterPack ( ) const

◆ Profile() [1/2]

void SubstTemplateTemplateParmPackStorage::Profile ( llvm::FoldingSetNodeID &  ID,
ASTContext Context 
)

◆ Profile() [2/2]

void SubstTemplateTemplateParmPackStorage::Profile ( llvm::FoldingSetNodeID &  ID,
ASTContext Context,
const TemplateArgument ArgPack,
Decl AssociatedDecl,
unsigned  Index,
bool  Final 
)
static

Definition at line 92 of file TemplateName.cpp.

References clang::TemplateArgument::Profile().


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