clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
clang::VarDecl Class Reference

#include <Decl.h>

Inheritance diagram for clang::VarDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::VarDecl:
Collaboration graph
[legend]

List of all members.

Classes

class  ParmVarDeclBitfields
class  VarDeclBitfields

Public Types

enum  DefinitionKind { DeclarationOnly, TentativeDefinition, Definition }
typedef clang::StorageClass StorageClass
typedef
redeclarable_base::redecl_iterator 
redecl_iterator

Public Member Functions

virtual SourceRange getSourceRange () const
 Source range that this declaration covers.
StorageClass getStorageClass () const
StorageClass getStorageClassAsWritten () const
void setStorageClass (StorageClass SC)
void setStorageClassAsWritten (StorageClass SC)
void setThreadSpecified (bool T)
bool isThreadSpecified () const
bool hasLocalStorage () const
bool isStaticLocal () const
bool hasExternalStorage () const
bool hasGlobalStorage () const
bool isExternC () const
 Determines whether this variable is a variable with external, C linkage.
bool isLocalVarDecl () const
bool isFunctionOrMethodVarDecl () const
bool isStaticDataMember () const
 Determines whether this is a static data member.
virtual VarDeclgetCanonicalDecl ()
 Retrieves the "canonical" declaration of the given declaration.
const VarDeclgetCanonicalDecl () const
DefinitionKind isThisDeclarationADefinition () const
 Check whether this declaration is a definition. If this could be a tentative definition (in C), don't check whether there's an overriding definition.
DefinitionKind hasDefinition () const
 Check whether this variable is defined in this translation unit.
VarDeclgetActingDefinition ()
 Get the tentative definition that acts as the real definition in a TU. Returns null if there is a proper definition available.
const VarDeclgetActingDefinition () const
bool isTentativeDefinitionNow () const
 Determine whether this is a tentative definition of a variable in C.
VarDeclgetDefinition ()
 Get the real (not just tentative) definition for this declaration.
const VarDeclgetDefinition () const
virtual bool isOutOfLine () const
 Determine whether this is or was instantiated from an out-of-line definition of a static data member.
VarDeclgetOutOfLineDefinition ()
 If this is a static data member, find its out-of-line definition.
bool isFileVarDecl () const
 isFileVarDecl - Returns true for file scoped variable declaration.
const ExprgetAnyInitializer () const
const ExprgetAnyInitializer (const VarDecl *&D) const
bool hasInit () const
const ExprgetInit () const
ExprgetInit ()
Stmt ** getInitAddress ()
 Retrieve the address of the initializer expression.
void setInit (Expr *I)
bool extendsLifetimeOfTemporary () const
 Determine whether this variable is a reference that extends the lifetime of its temporary initializer.
bool isUsableInConstantExpressions () const
 Determine whether this variable's value can be used in a constant expression, according to the relevant language standard. This only checks properties of the declaration, and does not check whether the initializer is in fact a constant expression.
EvaluatedStmtensureEvaluatedStmt () const
APValueevaluateValue () const
 Attempt to evaluate the value of the initializer attached to this declaration, and produce notes explaining why it cannot be evaluated or is not a constant expression. Returns a pointer to the value if evaluation succeeded, 0 otherwise.
APValueevaluateValue (llvm::SmallVectorImpl< PartialDiagnosticAt > &Notes) const
APValuegetEvaluatedValue () const
 Return the already-evaluated value of this variable's initializer, or NULL if the value is not yet known. Returns pointer to untyped APValue if the value could not be evaluated.
bool isInitKnownICE () const
 Determines whether it is already known whether the initializer is an integral constant expression or not.
bool isInitICE () const
 Determines whether the initializer is an integral constant expression, or in C++11, whether the initializer is a constant expression.
bool checkInitIsICE () const
 Determine whether the value of the initializer attached to this declaration is an integral constant expression.
void setCXXDirectInitializer (bool T)
bool hasCXXDirectInitializer () const
bool isExceptionVariable () const
 Determine whether this variable is the exception variable in a C++ catch statememt or an Objective-C statement.
void setExceptionVariable (bool EV)
bool isNRVOVariable () const
 Determine whether this local variable can be used with the named return value optimization (NRVO).
void setNRVOVariable (bool NRVO)
bool isCXXForRangeDecl () const
 Determine whether this variable is the for-range-declaration in a C++0x for-range statement.
void setCXXForRangeDecl (bool FRD)
bool isARCPseudoStrong () const
 Determine whether this variable is an ARC pseudo-__strong variable. A pseudo-__strong variable has a __strong-qualified type but does not actually retain the object written into it. Generally such variables are also 'const' for safety.
void setARCPseudoStrong (bool ps)
bool isConstexpr () const
 Whether this variable is (C++0x) constexpr.
void setConstexpr (bool IC)
VarDeclgetInstantiatedFromStaticDataMember () const
 If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated.
TemplateSpecializationKind getTemplateSpecializationKind () const
 If this variable is a static data member, determine what kind of template specialization or instantiation this is.
MemberSpecializationInfogetMemberSpecializationInfo () const
 If this variable is an instantiation of a static data member of a class template specialization, retrieves the member specialization information.
void setTemplateSpecializationKind (TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
 For a static data member that was instantiated from a static data member of a class template, set the template specialiation kind.

Static Public Member Functions

static const char * getStorageClassSpecifierString (StorageClass SC)
static VarDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S, StorageClass SCAsWritten)
static VarDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classof (const VarDecl *D)
static bool classofKind (Kind K)

Protected Types

enum  { NumParameterIndexBits = 8 }
typedef llvm::PointerUnion4
< Stmt *, EvaluatedStmt
*, UnparsedDefaultArgument
*, UninstantiatedDefaultArgument * > 
InitType
typedef Redeclarable< VarDeclredeclarable_base

Protected Member Functions

 VarDecl (Kind DK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass SC, StorageClass SCAsWritten)
virtual VarDeclgetNextRedeclaration ()
 Returns the next redeclaration or itself if this is the only decl.
virtual VarDeclgetPreviousDeclImpl ()
 Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
virtual VarDeclgetMostRecentDeclImpl ()
 Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.

Protected Attributes

InitType Init
 The initializer for this variable or, for a ParmVarDecl, the C++ default argument.
union {
   unsigned   AllBits
   VarDeclBitfields   VarDeclBits
   ParmVarDeclBitfields   ParmVarDeclBits
}; 

Friends

class ASTDeclReader
class StmtIteratorBase

Detailed Description

VarDecl - An instance of this class is created to represent a variable declaration or definition.

Definition at line 674 of file Decl.h.


Member Typedef Documentation

typedef llvm::PointerUnion4<Stmt *, EvaluatedStmt *, UnparsedDefaultArgument *, UninstantiatedDefaultArgument *> clang::VarDecl::InitType [protected]

Definition at line 691 of file Decl.h.

typedef redeclarable_base::redecl_iterator clang::VarDecl::redecl_iterator

Definition at line 795 of file Decl.h.

Definition at line 785 of file Decl.h.

Definition at line 676 of file Decl.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
NumParameterIndexBits 

Definition at line 737 of file Decl.h.

Enumerator:
DeclarationOnly 

This declaration is only a declaration.

TentativeDefinition 

This declaration is a tentative definition.

Definition 

This declaration is definitely a definition.

Definition at line 903 of file Decl.h.


Constructor & Destructor Documentation

clang::VarDecl::VarDecl ( Kind  DK,
DeclContext DC,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id,
QualType  T,
TypeSourceInfo TInfo,
StorageClass  SC,
StorageClass  SCAsWritten 
) [inline, protected]

Definition at line 772 of file Decl.h.

References AllBits, and VarDeclBits.

Referenced by Create(), and CreateDeserialized().


Member Function Documentation

bool VarDecl::checkInitIsICE ( ) const
static bool clang::VarDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::DeclaratorDecl.

Reimplemented in clang::ParmVarDecl, and clang::ImplicitParamDecl.

Definition at line 1144 of file Decl.h.

References classofKind(), and clang::Decl::getKind().

static bool clang::VarDecl::classof ( const VarDecl D) [inline, static]

Definition at line 1145 of file Decl.h.

static bool clang::VarDecl::classofKind ( Kind  K) [inline, static]

Reimplemented from clang::DeclaratorDecl.

Reimplemented in clang::ParmVarDecl, and clang::ImplicitParamDecl.

Definition at line 1146 of file Decl.h.

Referenced by classof().

VarDecl * VarDecl::Create ( ASTContext C,
DeclContext DC,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id,
QualType  T,
TypeSourceInfo TInfo,
StorageClass  S,
StorageClass  SCAsWritten 
) [static]
VarDecl * VarDecl::CreateDeserialized ( ASTContext C,
unsigned  ID 
) [static]
EvaluatedStmt * VarDecl::ensureEvaluatedStmt ( ) const

Convert the initializer for this declaration to the elaborated EvaluatedStmt form, which contains extra information on the evaluated value of the initializer.

Definition at line 1363 of file Decl.cpp.

References clang::Decl::getASTContext(), Init, and S.

Referenced by checkInitIsICE(), evaluateValue(), clang::ASTNodeImporter::VisitVarDecl(), and clang::ASTDeclReader::VisitVarDecl().

APValue * VarDecl::evaluateValue ( ) const

Attempt to evaluate the value of the initializer attached to this declaration, and produce notes explaining why it cannot be evaluated or is not a constant expression. Returns a pointer to the value if evaluation succeeded, 0 otherwise.

Definition at line 1374 of file Decl.cpp.

Referenced by clang::Sema::CheckCompleteVariableDeclaration(), checkInitIsICE(), clang::CodeGen::CodeGenModule::EmitConstantInit(), and EvaluateVarDeclInit().

APValue * VarDecl::evaluateValue ( llvm::SmallVectorImpl< PartialDiagnosticAt > &  Notes) const
bool VarDecl::extendsLifetimeOfTemporary ( ) const

Determine whether this variable is a reference that extends the lifetime of its temporary initializer.

A reference extends the lifetime of its temporary initializer if it's initializer is an rvalue that would normally go out of scope at the end of the initializer (a full expression). In such cases, the reference itself takes ownership of the temporary, which will be destroyed when the reference goes out of scope. For example:

 const int &r = 1.0; // creates a temporary of type 'int'

Definition at line 1457 of file Decl.cpp.

References getInit(), and clang::ValueDecl::getType().

VarDecl * VarDecl::getActingDefinition ( )

Get the tentative definition that acts as the real definition in a TU. Returns null if there is a proper definition available.

Definition at line 1239 of file Decl.cpp.

References Definition, clang::Redeclarable< VarDecl >::getFirstDeclaration(), isThisDeclarationADefinition(), clang::Redeclarable< decl_type >::redecls_begin(), clang::Redeclarable< decl_type >::redecls_end(), and TentativeDefinition.

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), and getActingDefinition().

const VarDecl* clang::VarDecl::getActingDefinition ( ) const [inline]

Definition at line 921 of file Decl.h.

References getActingDefinition().

const Expr* clang::VarDecl::getAnyInitializer ( ) const [inline]
const Expr * VarDecl::getAnyInitializer ( const VarDecl *&  D) const

getAnyInitializer - Get the initializer for this variable, no matter which declaration it is attached to. Also get that declaration.

Definition at line 1290 of file Decl.cpp.

References clang::Redeclarable< VarDecl >::redecls_begin(), and clang::Redeclarable< VarDecl >::redecls_end().

VarDecl * VarDecl::getCanonicalDecl ( ) [virtual]
const VarDecl* clang::VarDecl::getCanonicalDecl ( ) const [inline]

Reimplemented from clang::Decl.

Definition at line 899 of file Decl.h.

References getCanonicalDecl().

VarDecl * VarDecl::getDefinition ( )
const VarDecl* clang::VarDecl::getDefinition ( ) const [inline]

Definition at line 931 of file Decl.h.

References getDefinition().

APValue* clang::VarDecl::getEvaluatedValue ( ) const [inline]

Return the already-evaluated value of this variable's initializer, or NULL if the value is not yet known. Returns pointer to untyped APValue if the value could not be evaluated.

Definition at line 1044 of file Decl.h.

References Init.

Referenced by EvaluateVarDeclInit().

const Expr* clang::VarDecl::getInit ( ) const [inline]
Expr* clang::VarDecl::getInit ( ) [inline]

Definition at line 981 of file Decl.h.

References Init, and S.

Stmt** clang::VarDecl::getInitAddress ( ) [inline]

Retrieve the address of the initializer expression.

Definition at line 995 of file Decl.h.

References Init.

Referenced by clang::StmtIteratorBase::GetDeclExpr().

VarDecl * VarDecl::getInstantiatedFromStaticDataMember ( ) const

If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated.

Definition at line 1470 of file Decl.cpp.

References getMemberSpecializationInfo().

Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::CheckMemberSpecialization(), DoMarkVarDeclReferenced(), clang::Sema::InstantiateClassMembers(), clang::Sema::InstantiateStaticDataMemberDefinition(), isInstantiationOfStaticDataMember(), and isOutOfLine().

MemberSpecializationInfo * VarDecl::getMemberSpecializationInfo ( ) const
virtual VarDecl* clang::VarDecl::getMostRecentDeclImpl ( ) [inline, protected, virtual]

Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.

Reimplemented from clang::Decl.

Definition at line 790 of file Decl.h.

References clang::Redeclarable< VarDecl >::getMostRecentDecl().

virtual VarDecl* clang::VarDecl::getNextRedeclaration ( ) [inline, protected, virtual]

Returns the next redeclaration or itself if this is the only decl.

Decl subclasses that can be redeclared should override this method so that Decl::redecl_iterator can iterate over them.

Reimplemented from clang::Decl.

Definition at line 786 of file Decl.h.

References clang::Redeclarable< VarDecl >::RedeclLink.

VarDecl * VarDecl::getOutOfLineDefinition ( )
virtual VarDecl* clang::VarDecl::getPreviousDeclImpl ( ) [inline, protected, virtual]

Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.

Reimplemented from clang::Decl.

Definition at line 787 of file Decl.h.

References clang::Redeclarable< VarDecl >::getPreviousDecl().

SourceRange VarDecl::getSourceRange ( ) const [virtual]
StorageClass clang::VarDecl::getStorageClass ( ) const [inline]
StorageClass clang::VarDecl::getStorageClassAsWritten ( ) const [inline]
const char * VarDecl::getStorageClassSpecifierString ( StorageClass  SC) [static]

getStorageClassSpecifierString - Return the string used to specify the storage class

  • SC.

It is illegal to call this function with SC == None.

Definition at line 1130 of file Decl.cpp.

References clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_OpenCLWorkGroupLocal, clang::SC_PrivateExtern, clang::SC_Register, and clang::SC_Static.

TemplateSpecializationKind VarDecl::getTemplateSpecializationKind ( ) const
bool clang::VarDecl::hasCXXDirectInitializer ( ) const [inline]

hasCXXDirectInitializer - If true, the initializer was a direct initializer, e.g: "int x(1);". The Init expression will be the expression inside the parens or a "ClassType(a,b,c)" class constructor expression for class types. Clients can distinguish between "int x(1);" and "int x=1;" by checking hasCXXDirectInitializer.

Definition at line 1084 of file Decl.h.

References VarDeclBits.

Referenced by clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

VarDecl::DefinitionKind VarDecl::hasDefinition ( ) const

Check whether this variable is defined in this translation unit.

Definition at line 1279 of file Decl.cpp.

References DeclarationOnly, clang::Redeclarable< VarDecl >::getFirstDeclaration(), clang::Redeclarable< decl_type >::redecls_begin(), and clang::Redeclarable< decl_type >::redecls_end().

Referenced by MarkVarDeclODRUsed().

bool clang::VarDecl::hasExternalStorage ( ) const [inline]
bool clang::VarDecl::hasGlobalStorage ( ) const [inline]

hasGlobalStorage - Returns true for all variables that do not have local storage. This includs all global variables as well as static variables declared within a function.

Definition at line 855 of file Decl.h.

References hasLocalStorage().

Referenced by clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckShadow(), clang::Sema::CheckVariableDeclaration(), EmitDeclInit(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::Sema::FinalizeVarWithDestructor(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalVar(), clang::ento::MemRegionManager::getVarRegion(), isAlwaysAlive(), and isTrackedVar().

bool clang::VarDecl::hasInit ( ) const [inline]

Definition at line 967 of file Decl.h.

References Init.

Referenced by EvalAddr(), EvalVal(), isThisDeclarationADefinition(), and MarkVarDeclODRUsed().

bool clang::VarDecl::hasLocalStorage ( ) const [inline]
bool clang::VarDecl::isARCPseudoStrong ( ) const [inline]

Determine whether this variable is an ARC pseudo-__strong variable. A pseudo-__strong variable has a __strong-qualified type but does not actually retain the object written into it. Generally such variables are also 'const' for safety.

Definition at line 1117 of file Decl.h.

References VarDeclBits.

Referenced by CheckForModifiableLvalue(), clang::CodeGen::CodeGenFunction::emitAutoVarTypeCleanup(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), and clang::ASTDeclWriter::VisitVarDecl().

bool clang::VarDecl::isConstexpr ( ) const [inline]
bool clang::VarDecl::isCXXForRangeDecl ( ) const [inline]

Determine whether this variable is the for-range-declaration in a C++0x for-range statement.

Definition at line 1110 of file Decl.h.

References VarDeclBits.

Referenced by clang::ASTDeclWriter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

bool clang::VarDecl::isExceptionVariable ( ) const [inline]

Determine whether this variable is the exception variable in a C++ catch statememt or an Objective-C statement.

Definition at line 1090 of file Decl.h.

References VarDeclBits.

Referenced by clang::Sema::getCopyElisionCandidate(), isTrackedVar(), clang::ASTDeclWriter::VisitParmVarDecl(), and clang::ASTDeclWriter::VisitVarDecl().

bool VarDecl::isExternC ( ) const
bool clang::VarDecl::isFileVarDecl ( ) const [inline]
bool clang::VarDecl::isFunctionOrMethodVarDecl ( ) const [inline]

isFunctionOrMethodVarDecl - Similar to isLocalVarDecl, but excludes variables declared in blocks.

Definition at line 877 of file Decl.h.

References clang::Decl::getDeclContext(), clang::DeclContext::getDeclKind(), clang::Decl::getKind(), clang::DeclContext::getRedeclContext(), and clang::DeclContext::isFunctionOrMethod().

bool clang::VarDecl::isInitICE ( ) const [inline]

Determines whether the initializer is an integral constant expression, or in C++11, whether the initializer is a constant expression.

Precondition:
isInitKnownICE()

Definition at line 1066 of file Decl.h.

References Init, and isInitKnownICE().

Referenced by clang::Sema::CheckCompleteVariableDeclaration(), and clang::ASTDeclWriter::VisitVarDecl().

bool clang::VarDecl::isInitKnownICE ( ) const [inline]

Determines whether it is already known whether the initializer is an integral constant expression or not.

Definition at line 1054 of file Decl.h.

References Init.

Referenced by isInitICE(), and clang::ASTDeclWriter::VisitVarDecl().

bool clang::VarDecl::isLocalVarDecl ( ) const [inline]

isLocalVarDecl - Returns true for local variable declarations other than parameters. Note that this includes static variables inside of functions. It also includes variables inside blocks.

void foo() { int x; static int y; extern int z; }

Definition at line 867 of file Decl.h.

References clang::Decl::getDeclContext(), and clang::Decl::getKind().

Referenced by clang::Sema::ActOnForStmt(), clang::Sema::AddInitializerToDecl(), clang::CodeGen::CodeGenFunction::EmitDecl(), isTrackedVar(), and clang::Sema::MergeVarDecl().

bool clang::VarDecl::isNRVOVariable ( ) const [inline]

Determine whether this local variable can be used with the named return value optimization (NRVO).

The named return value optimization (NRVO) works by marking certain non-volatile local variables of class type as NRVO objects. These locals can be allocated within the return slot of their containing function, in which case there is no need to copy the object to the return slot when returning from the function. Within the function body, each return that returns the NRVO object will have this variable as its NRVO candidate.

Definition at line 1105 of file Decl.h.

References VarDeclBits.

Referenced by clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), and clang::ASTDeclWriter::VisitVarDecl().

bool VarDecl::isOutOfLine ( ) const [virtual]

Determine whether this is or was instantiated from an out-of-line definition of a static data member.

Reimplemented from clang::Decl.

Definition at line 1302 of file Decl.cpp.

References getInstantiatedFromStaticDataMember(), clang::Decl::isOutOfLine(), and isStaticDataMember().

Referenced by isThisDeclarationADefinition(), clang::Sema::MergeVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

bool clang::VarDecl::isStaticDataMember ( ) const [inline]
bool clang::VarDecl::isStaticLocal ( ) const [inline]

isStaticLocal - Returns true if a variable with function scope is a static local variable.

Definition at line 841 of file Decl.h.

References getStorageClass(), isFileVarDecl(), and clang::SC_Static.

Referenced by clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::FinalizeVarWithDestructor(), clang::ento::MemRegionManager::getVarRegion(), and clang::PseudoConstantAnalysis::isPseudoConstant().

bool VarDecl::isTentativeDefinitionNow ( ) const

Determine whether this is a tentative definition of a variable in C.

Definition at line 1257 of file Decl.cpp.

References Definition, isThisDeclarationADefinition(), clang::Redeclarable< VarDecl >::redecls_begin(), clang::Redeclarable< VarDecl >::redecls_end(), and TentativeDefinition.

VarDecl::DefinitionKind VarDecl::isThisDeclarationADefinition ( ) const
bool clang::VarDecl::isThreadSpecified ( ) const [inline]
bool VarDecl::isUsableInConstantExpressions ( ) const

Determine whether this variable's value can be used in a constant expression, according to the relevant language standard. This only checks properties of the declaration, and does not check whether the initializer is in fact a constant expression.

Definition at line 1340 of file Decl.cpp.

References clang::Decl::getASTContext(), clang::ASTContext::getLangOptions(), clang::ValueDecl::getType(), isConstexpr(), and clang::isIntegralOrEnumerationType().

Referenced by clang::Sema::CheckCompleteVariableDeclaration(), and DoMarkVarDeclReferenced().

void clang::VarDecl::setARCPseudoStrong ( bool  ps) [inline]

Definition at line 1118 of file Decl.h.

References VarDeclBits.

Referenced by clang::Sema::ActOnForEachDeclStmt().

void clang::VarDecl::setConstexpr ( bool  IC) [inline]
void clang::VarDecl::setCXXDirectInitializer ( bool  T) [inline]
void clang::VarDecl::setCXXForRangeDecl ( bool  FRD) [inline]
void clang::VarDecl::setExceptionVariable ( bool  EV) [inline]

Definition at line 1093 of file Decl.h.

References VarDeclBits.

Referenced by clang::Sema::BuildExceptionDeclaration(), and clang::Sema::BuildObjCExceptionDecl().

void VarDecl::setInit ( Expr I)
void clang::VarDecl::setNRVOVariable ( bool  NRVO) [inline]

Definition at line 1106 of file Decl.h.

References VarDeclBits.

void VarDecl::setStorageClass ( StorageClass  SC)
void clang::VarDecl::setStorageClassAsWritten ( StorageClass  SC) [inline]

Definition at line 817 of file Decl.h.

References clang::isLegalForVariable(), and VarDeclBits.

void VarDecl::setTemplateSpecializationKind ( TemplateSpecializationKind  TSK,
SourceLocation  PointOfInstantiation = SourceLocation() 
)
void clang::VarDecl::setThreadSpecified ( bool  T) [inline]

Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::DeclaratorDecl.

Definition at line 733 of file Decl.h.

friend class StmtIteratorBase [friend]

Definition at line 734 of file Decl.h.


Member Data Documentation

union { ... } [protected]

Definition at line 767 of file Decl.h.

Referenced by VarDecl().

InitType clang::VarDecl::Init [mutable, protected]
VarDeclBitfields clang::VarDecl::VarDeclBits

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