VarDeclaration

extern (C++)
class VarDeclaration : Declaration {
Initializer _init;
uint offset;
FuncDeclarations nestedrefs;
bool isargptr;
structalign_t alignment;
bool ctorinit;
bool onstack;
bool mynew;
int canassign;
bool overlapped;
bool overlapUnsafe;
ubyte isdataseg;
Dsymbol aliassym;
VarDeclaration lastVar;
uint endlinnum;
int ctfeAdrOnStack;
VarDeclaration rundtor;
Expression edtor;
IntRange* range;
}

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. Returns true if error occurs.

expandInitializer
Expression expandInitializer(Loc loc)

Helper function for the expansion of manifest constant.

getConstInitializer
Expression getConstInitializer(bool needFullType = true)

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

checkModify
int checkModify(Loc loc, Scope* sc, Type t, Expression e1, int flag)

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

Meta