clang 20.0.0git
|
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in. More...
#include "clang/AST/DeclTemplate.h"
Public Member Functions | |
SourceRange | getSourceRange () const override LLVM_READONLY |
Source range that this declaration covers. | |
const DefArgStorage & | getDefaultArgStorage () const |
bool | hasDefaultArgument () const |
Determine whether this template parameter has a default argument. | |
const TemplateArgumentLoc & | getDefaultArgument () const |
Retrieve the default argument, if any. | |
SourceLocation | getDefaultArgumentLoc () const |
Retrieve the location of the default argument, if any. | |
bool | defaultArgumentWasInherited () const |
Determines whether the default argument was inherited from a previous declaration of this template. | |
void | setDefaultArgument (const ASTContext &C, const TemplateArgumentLoc &DefArg) |
Set the default argument for this template parameter, and whether that default argument was inherited from another declaration. | |
void | setInheritedDefaultArgument (const ASTContext &C, NonTypeTemplateParmDecl *Parm) |
void | removeDefaultArgument () |
Removes the default argument of this template parameter. | |
bool | isParameterPack () const |
Whether this parameter is a non-type template parameter pack. | |
bool | isPackExpansion () const |
Whether this parameter pack is a pack expansion. | |
bool | isExpandedParameterPack () const |
Whether this parameter is a non-type template parameter pack that has a known list of different types at different positions. | |
unsigned | getNumExpansionTypes () const |
Retrieves the number of expansion types in an expanded parameter pack. | |
QualType | getExpansionType (unsigned I) const |
Retrieve a particular expansion type within an expanded parameter pack. | |
TypeSourceInfo * | getExpansionTypeSourceInfo (unsigned I) const |
Retrieve a particular expansion type source info within an expanded parameter pack. | |
Expr * | getPlaceholderTypeConstraint () const |
Return the constraint introduced by the placeholder type of this non-type template parameter (if any). | |
void | setPlaceholderTypeConstraint (Expr *E) |
bool | hasPlaceholderTypeConstraint () const |
Determine whether this non-type template parameter's type has a placeholder with a type-constraint. | |
void | getAssociatedConstraints (llvm::SmallVectorImpl< const Expr * > &AC) const |
Get the associated-constraints of this template parameter. | |
unsigned | getDepth () const |
Get the nesting depth of the template parameter. | |
void | setDepth (unsigned D) |
unsigned | getPosition () const |
Get the position of the template parameter within its parameter list. | |
void | setPosition (unsigned P) |
unsigned | getIndex () const |
Get the index of the template parameter within its parameter list. | |
![]() | |
TypeSourceInfo * | getTypeSourceInfo () const |
void | setTypeSourceInfo (TypeSourceInfo *TI) |
SourceLocation | getInnerLocStart () const |
Return start of source range ignoring outer template declarations. | |
void | setInnerLocStart (SourceLocation L) |
SourceLocation | getOuterLocStart () const |
Return start of source range taking into account any outer template declarations. | |
SourceRange | getSourceRange () const override LLVM_READONLY |
Source range that this declaration covers. | |
SourceLocation | getBeginLoc () const LLVM_READONLY |
NestedNameSpecifier * | getQualifier () const |
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in the source. | |
NestedNameSpecifierLoc | getQualifierLoc () const |
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this declaration, if it was present in the source. | |
void | setQualifierInfo (NestedNameSpecifierLoc QualifierLoc) |
Expr * | getTrailingRequiresClause () |
Get the constraint-expression introduced by the trailing requires-clause in the function/member declaration, or null if no requires-clause was provided. | |
const Expr * | getTrailingRequiresClause () const |
void | setTrailingRequiresClause (Expr *TrailingRequiresClause) |
unsigned | getNumTemplateParameterLists () const |
TemplateParameterList * | getTemplateParameterList (unsigned index) const |
void | setTemplateParameterListsInfo (ASTContext &Context, ArrayRef< |