VarDeclaration

extern (C++)
class VarDeclaration : Declaration {
Initializer _init;
FuncDeclarations nestedrefs;
TupleDeclaration aliasTuple;
VarDeclaration lastVar;
Expression edtor;
IntRange* range;
VarDeclarations* maybes;
uint endlinnum;
uint offset;
uint sequenceNumber;
structalign_t alignment;
enum AdrOnStackNone;
uint ctfeAdrOnStack;
byte canassign;
ubyte isdataseg;
}

Members

Functions

callScopeDtor
Expression callScopeDtor(Scope* sc)

If a variable has a scope destructor call, return call for it. Otherwise, return NULL.

canTakeAddressOf
bool canTakeAddressOf()

Return true if we can take the address of this variable.

checkNestedReference
bool checkNestedReference(Scope* sc, Loc loc)

Check to see if this variable is actually in an enclosing function rather than the current one. Update nestedrefs[], closureVars[] and outerVars[].

expandInitializer
Expression expandInitializer(Loc loc)

Helper function for the expansion of manifest constant.

getConstInitializer
Expression getConstInitializer(bool needFullType)

If variable has a constant expression initializer, get it. Otherwise, return null.

isCTFE
bool isCTFE()

Can variable be read and written by CTFE?

isDataseg
bool isDataseg()

Does symbol go into data segment? Includes extern variables.

isThreadlocal
bool isThreadlocal()

Does symbol go into thread local storage?

needsScopeDtor
bool needsScopeDtor()

Return true if variable needs to call the destructor.

Inherited Members

From Declaration

checkDisabled
bool checkDisabled(Loc loc, Scope* sc, bool isAliasedDeclaration)

Issue an error if an attempt to call a disabled method is made

checkModify
Modifiable checkModify(Loc loc, Scope* sc, Expression e1, ModifyFlags flag)

Check to see if declaration can be modified in this context (sc). Issue error if not.

resolvedLinkage
LINK resolvedLinkage()

Returns the linkage, resolving the target-specific System one.

isReference
bool isReference()

Meta