clang  3.7.0
Classes | Public Member Functions | List of all members
clang::DefaultArgStorage< ParmDecl, ArgType > Class Template Reference

#include <DeclTemplate.h>

Inheritance diagram for clang::DefaultArgStorage< ParmDecl, ArgType >:
[legend]

Public Member Functions

 DefaultArgStorage ()
 
bool isSet () const
 Determine whether there is a default argument for this parameter. More...
 
bool isInherited () const
 
ArgType get () const
 
const ParmDecl * getInheritedFrom () const
 
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...
 

Detailed Description

template<typename ParmDecl, typename ArgType>
class clang::DefaultArgStorage< ParmDecl, ArgType >

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 231 of file DeclTemplate.h.

Constructor & Destructor Documentation

template<typename ParmDecl, typename ArgType>
clang::DefaultArgStorage< ParmDecl, ArgType >::DefaultArgStorage ( )
inline

Definition at line 255 of file DeclTemplate.h.

Member Function Documentation

template<typename ParmDecl, typename ArgType>
void clang::DefaultArgStorage< ParmDecl, ArgType >::clear ( )
inline

Remove the default argument, even if it was inherited.

Definition at line 297 of file DeclTemplate.h.

template<typename ParmDecl, typename ArgType>
ArgType clang::DefaultArgStorage< ParmDecl, ArgType >::get ( ) const
inline

Get the default argument's value. This does not consider whether the default argument is visible.

Definition at line 264 of file DeclTemplate.h.

template<typename ParmDecl, typename ArgType>
const ParmDecl* clang::DefaultArgStorage< ParmDecl, ArgType >::getInheritedFrom ( ) const
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 274 of file DeclTemplate.h.

template<typename ParmDecl, typename ArgType>
bool clang::DefaultArgStorage< ParmDecl, ArgType >::isInherited ( ) const
inline

Determine whether the default argument for this parameter was inherited from a previous declaration of the same entity.

Definition at line 261 of file DeclTemplate.h.

Referenced by clang::DefaultArgStorage< TemplateTypeParmDecl, TypeSourceInfo * >::setInherited().

template<typename ParmDecl, typename ArgType>
bool clang::DefaultArgStorage< ParmDecl, ArgType >::isSet ( ) const
inline

Determine whether there is a default argument for this parameter.

Definition at line 258 of file DeclTemplate.h.

Referenced by clang::DefaultArgStorage< TemplateTypeParmDecl, TypeSourceInfo * >::set(), and clang::DefaultArgStorage< TemplateTypeParmDecl, TypeSourceInfo * >::setInherited().

template<typename ParmDecl, typename ArgType>
void clang::DefaultArgStorage< ParmDecl, ArgType >::set ( ArgType  Arg)
inline

Set the default argument.

Definition at line 282 of file DeclTemplate.h.

Referenced by clang::TemplateTemplateParmDecl::setDefaultArgument().

template<typename ParmDecl, typename ArgType>
void clang::DefaultArgStorage< ParmDecl, ArgType >::setInherited ( const ASTContext C,
ParmDecl *  InheritedFrom 
)
inline

Set that the default argument was inherited from another parameter.

Definition at line 287 of file DeclTemplate.h.


The documentation for this class was generated from the following file: