Data structure that captures multiple levels of template argument lists for use in template instantiation. More...
#include "clang/Sema/Template.h"
OldDepth
outermost template parameter lists would be removed by substituting these arguments.
Data structure that captures multiple levels of template argument lists for use in template instantiation.
Multiple levels of template arguments occur when instantiating the definitions of member templates. For example:
template<typename T>
template<T Value>
struct Y {
void f();
};
};
When instantiating X<int>::Y<17>::f, the multi-level template argument list will contain a template argument list (int) at depth 0 and a template argument list (17) at depth 1.
Definition at line 76 of file Template.h.
◆ MultiLevelTemplateArgumentList() [1/2] clang::MultiLevelTemplateArgumentList::MultiLevelTemplateArgumentList ( ) defaultConstruct an empty set of template argument lists.
◆ MultiLevelTemplateArgumentList() [2/2] clang::MultiLevelTemplateArgumentList::MultiLevelTemplateArgumentList ( Decl * D, ArgList Args, bool Final ) inline ◆ addOuterRetainedLevel() void clang::MultiLevelTemplateArgumentList::addOuterRetainedLevel ( ) inlineAdd an outermost level that we are not substituting.
We have no arguments at this level, and do not remove it from the depth of inner template parameters that we instantiate.
Definition at line 257 of file Template.h.
◆ addOuterRetainedLevels() void clang::MultiLevelTemplateArgumentList::addOuterRetainedLevels ( unsigned Num ) inline ◆ addOuterTemplateArguments() [1/3] void clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments ( ArgList Args ) inline ◆ addOuterTemplateArguments() [2/3] void clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments ( Decl * AssociatedDecl, ArgList Args, bool Final ) inline ◆ addOuterTemplateArguments() [3/3] void clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments ( std::nullopt_t ) inlineDefinition at line 228 of file Template.h.
◆ begin() [1/2] ArgListsIterator clang::MultiLevelTemplateArgumentList::begin ( ) inline ◆ begin() [2/2] ConstArgListsIterator clang::MultiLevelTemplateArgumentList::begin ( ) const inlineDefinition at line 273 of file Template.h.
◆ dump() LLVM_DUMP_METHOD void clang::MultiLevelTemplateArgumentList::dump ( ) const inline ◆ end() [1/2] ArgListsIterator clang::MultiLevelTemplateArgumentList::end ( ) inlineDefinition at line 276 of file Template.h.
◆ end() [2/2] ConstArgListsIterator clang::MultiLevelTemplateArgumentList::end ( ) const inlineDefinition at line 277 of file Template.h.
◆ getAssociatedDecl() std::pair< Decl *, bool > clang::MultiLevelTemplateArgumentList::getAssociatedDecl ( unsigned Depth ) const inlineA template-like entity which owns the whole pattern being substituted.
This will usually own a set of template parameters, or in some cases might even be a template parameter itself.
Definition at line 164 of file Template.h.
References getNumLevels().
◆ getInnermost() const ArgList & clang::MultiLevelTemplateArgumentList::getInnermost ( ) const inline ◆ getKind() ◆ getNewDepth() unsigned clang::MultiLevelTemplateArgumentList::getNewDepth ( unsigned OldDepth ) const inlineDetermine how many of the OldDepth
outermost template parameter lists would be removed by substituting these arguments.
Definition at line 145 of file Template.h.
References getNumLevels().
◆ getNumLevels() unsigned clang::MultiLevelTemplateArgumentList::getNumLevels ( ) const inlineDetermine the number of levels in this template argument list.
Definition at line 123 of file Template.h.
Referenced by CalculateTemplateDepthForConstraints(), clang::Sema::CheckParameterPacksForExpansion(), dump(), getAssociatedDecl(), getNewDepth(), clang::Sema::getNumArgumentsInExpansionFromUnexpanded(), getNumSubsitutedArgs(), hasTemplateArgument(), clang::TemplateDeclInstantiator::InstantiateTypeAliasTemplateDecl(), operator()(), and setArgument().
◆ getNumRetainedOuterLevels() unsigned clang::MultiLevelTemplateArgumentList::getNumRetainedOuterLevels ( ) const inline ◆ getNumSubsitutedArgs() unsigned clang::MultiLevelTemplateArgumentList::getNumSubsitutedArgs ( unsigned Depth ) const inline ◆ getNumSubstitutedLevels() unsigned clang::MultiLevelTemplateArgumentList::getNumSubstitutedLevels ( ) const inline ◆ getOutermost() const ArgList & clang::MultiLevelTemplateArgumentList::getOutermost ( ) const inline ◆ hasTemplateArgument() bool clang::MultiLevelTemplateArgumentList::hasTemplateArgument ( unsigned Depth, unsigned Index ) const inline ◆ isAnyArgInstantiationDependent() bool clang::MultiLevelTemplateArgumentList::isAnyArgInstantiationDependent ( ) const inline ◆ isRewrite() bool clang::MultiLevelTemplateArgumentList::isRewrite ( ) const inlineDetermine whether we are rewriting template parameters rather than substituting for them.
If so, we should not leave references to the original template parameters behind.
Definition at line 117 of file Template.h.
References clang::Rewrite.
◆ operator()() ◆ replaceInnermostTemplateArguments() void clang::MultiLevelTemplateArgumentList::replaceInnermostTemplateArguments ( Decl * AssociatedDecl, ArgList Args ) inlineReplaces the current 'innermost' level with the provided argument list.
This is useful for type deduction cases where we need to get the entire list from the AST, but then add the deduced innermost list.
Definition at line 237 of file Template.h.
Referenced by CheckDeducedArgumentConstraints().
◆ setArgument() ◆ setKind()The documentation for this class was generated from the following file:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4