clang
10.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. More... | |
bool | isInherited () const |
Determine whether the default argument for this parameter was inherited from a previous declaration of the same entity. More... | |
ArgType | get () const |
Get the default argument's value. More... | |
const ParmDecl * | getInheritedFrom () const |
Get the parameter from which we inherit the default argument, if any. More... | |
void | set (ArgType Arg) |
Set the default argument. More... | |
void | setInherited (const ASTContext &C, ParmDecl *InheritedFrom) |
Set that the default argument was inherited from another parameter. More... | |
void | clear () |
Remove the default argument, even if it was inherited. More... | |
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 316 of file DeclTemplate.h.
|
inline |
Definition at line 340 of file DeclTemplate.h.
|
inline |
Remove the default argument, even if it was inherited.
Definition at line 388 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 351 of file DeclTemplate.h.
Referenced by clang::TemplateTypeParmDecl::getDefaultArgument(), clang::NonTypeTemplateParmDecl::getDefaultArgument(), clang::TemplateTemplateParmDecl::getDefaultArgument(), and clang::TemplateTypeParmDecl::getDefaultArgumentInfo().
|
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 362 of file DeclTemplate.h.
Referenced by clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitNonTypeTemplateParmDecl(), clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitTemplateTemplateParmDecl(), and clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitTemplateTypeParmDecl().
|
inline |
Determine whether the default argument for this parameter was inherited from a previous declaration of the same entity.
Definition at line 347 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 343 of file DeclTemplate.h.
Referenced by clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateTypeParmDecl::hasDefaultArgument(), clang::NonTypeTemplateParmDecl::hasDefaultArgument(), and clang::TemplateTemplateParmDecl::hasDefaultArgument().
|
inline |
Set the default argument.
Definition at line 371 of file DeclTemplate.h.
Referenced by clang::TemplateTypeParmDecl::setDefaultArgument(), and clang::NonTypeTemplateParmDecl::setDefaultArgument().
|
inline |
Set that the default argument was inherited from another parameter.
Definition at line 377 of file DeclTemplate.h.
Referenced by clang::TemplateTypeParmDecl::setInheritedDefaultArgument(), clang::NonTypeTemplateParmDecl::setInheritedDefaultArgument(), and clang::TemplateTemplateParmDecl::setInheritedDefaultArgument().