clang 20.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 299 of file DeclTemplate.h.
|
inline |
Definition at line 323 of file DeclTemplate.h.
|
inline |
Remove the default argument, even if it was inherited.
Definition at line 380 of file DeclTemplate.h.
Referenced by clang::TemplateTypeParmDecl::removeDefaultArgument(), clang::NonTypeTemplateParmDecl::removeDefaultArgument(), and clang::TemplateTemplateParmDecl::removeDefaultArgument().
|
inline |
Get the default argument's value.
This does not consider whether the default argument is visible.
Definition at line 334 of file DeclTemplate.h.
References clang::C.
Referenced by clang::TemplateTypeParmDecl::getDefaultArgument(), clang::NonTypeTemplateParmDecl::getDefaultArgument(), clang::TemplateTemplateParmDecl::getDefaultArgument(), and clang::DefaultArgStorage< ParmDecl, ArgType >::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 345 of file DeclTemplate.h.
|
inline |
Determine whether the default argument for this parameter was inherited from a previous declaration of the same entity.
Definition at line 330 of file DeclTemplate.h.
Referenced by clang::TemplateTypeParmDecl::defaultArgumentWasInherited(), clang::NonTypeTemplateParmDecl::defaultArgumentWasInherited(), and clang::TemplateTemplateParmDecl::defaultArgumentWasInherited().
|
inline |
Determine whether there is a default argument for this parameter.
Definition at line 326 of file DeclTemplate.h.
Referenced by clang::TemplateTypeParmDecl::getDefaultArgument(), clang::NonTypeTemplateParmDecl::getDefaultArgument(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateTypeParmDecl::hasDefaultArgument(), clang::NonTypeTemplateParmDecl::hasDefaultArgument(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::DefaultArgStorage< ParmDecl, ArgType >::set(), and clang::DefaultArgStorage< ParmDecl, ArgType >::setInherited().
|
inline |
Set the default argument.
Definition at line 354 of file DeclTemplate.h.
References clang::DefaultArgStorage< ParmDecl, ArgType >::isSet().
Referenced by clang::TemplateTypeParmDecl::setDefaultArgument(), clang::NonTypeTemplateParmDecl::setDefaultArgument(), and clang::TemplateTemplateParmDecl::setDefaultArgument().
|
inline |
Set that the default argument was inherited from another parameter.
Definition at line 360 of file DeclTemplate.h.
References clang::allocateDefaultArgStorageChain(), clang::C, D, clang::DefaultArgStorage< ParmDecl, ArgType >::get(), and clang::DefaultArgStorage< ParmDecl, ArgType >::isSet().
Referenced by clang::NonTypeTemplateParmDecl::setInheritedDefaultArgument(), clang::TemplateTemplateParmDecl::setInheritedDefaultArgument(), and clang::TemplateTypeParmDecl::setInheritedDefaultArgument().