clang 22.0.0git
|
Storage for a default argument. More...
#include "clang/AST/DeclTemplate.h"
Public Member Functions | |
DefaultArgStorage () | |
bool | isSet () const |
Determine whether there is a default argument for this parameter. | |
bool | isInherited () const |
Determine whether the default argument for this parameter was inherited from a previous declaration of the same entity. | |
ArgType | get () const |
Get the default argument's value. | |
const ParmDecl * | getInheritedFrom () const |
Get the parameter from which we inherit the default argument, if any. | |
void | set (ArgType Arg) |
Set the default argument. | |
void | setInherited (const ASTContext &C, ParmDecl *InheritedFrom) |
Set that the default argument was inherited from another parameter. | |
void | clear () |
Remove the default argument, even if it was inherited. |
Storage for a default argument.
This is conceptually either empty, or an argument value, or a pointer to a previous declaration that had a default argument.
However, this is complicated by modules: while we require all the default arguments for a template to be equivalent, there may be more than one, and we need to track all the originating parameters to determine if the default argument is visible.
Definition at line 303 of file DeclTemplate.h.
|
inline |
Definition at line 326 of file DeclTemplate.h.
|
inline |
Remove the default argument, even if it was inherited.
Definition at line 382 of file DeclTemplate.h.
|
inline |
Get the default argument's value.
This does not consider whether the default argument is visible.
Definition at line 337 of file DeclTemplate.h.
Referenced by clang::DefaultArgStorage< TemplateTypeParmDecl, TemplateArgumentLoc * >::setInherited().
|
inline |
Get the parameter from which we inherit the default argument, if any.
This is the parameter on which the default argument was actually written.
Definition at line 348 of file DeclTemplate.h.
Referenced by clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitNonTypeTemplateParmDecl(), clang::JSONNodeDumper::VisitNonTypeTemplateParmDecl(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitTemplateTemplateParmDecl(), clang::JSONNodeDumper::VisitTemplateTemplateParmDecl(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitTemplateTypeParmDecl(), and clang::JSONNodeDumper::VisitTemplateTypeParmDecl().
|
inline |
Determine whether the default argument for this parameter was inherited from a previous declaration of the same entity.
Definition at line 333 of file DeclTemplate.h.
|
inline |
Determine whether there is a default argument for this parameter.
Definition at line 329 of file DeclTemplate.h.
Referenced by clang::DefaultArgStorage< TemplateTypeParmDecl, TemplateArgumentLoc * >::set(), and clang::DefaultArgStorage< TemplateTypeParmDecl, TemplateArgumentLoc * >::setInherited().
|
inline |
Set the default argument.
Definition at line 357 of file DeclTemplate.h.
|
inline |
Set that the default argument was inherited from another parameter.
Definition at line 363 of file DeclTemplate.h.