dmd.declaration
Miscellaneous declarations, including typedef, alias, variable declarations including the
implicit this declaration, type tuples, ClassInfo, ModuleInfo and various TypeInfos.
License
Source: declaration.d
Documentation: https://dlang.org/phobos/dmd_declaration.html
-
Declaration
boolcheckFrameAccess(Locloc, Scope*sc, AggregateDeclarationad, size_tiStart= 0);Check to see the aggregate type is nested and its context pointer is accessible from the current scope. Returns
trueif error occurs. -
Declaration
boolmodifyFieldVar(Locloc, Scope*sc, VarDeclarationvar, Expressione1);Mark variable v as modified if it is inside a constructor that
varis a field in. -
Declaration
voidObjectNotFound(Identifierid); -
Declaration
abstract classDeclaration: dmd.dsymbol.Dsymbol;-
Declaration
final boolcheckDisabled(Locloc, Scope*sc, boolisAliasedDeclaration= false);Issue an error if an attempt to call a disabled method is made
Discussion
If the declaration is disabled but inside a disabled function, returns
truebut do not issue an error message.Parameters
LoclocLocation information of the call
Scope*scScope in which the call occurs
boolisAliasedDeclarationif
truesearches overload setReturn Value
trueif thisDeclarationis@disabled,falseotherwise. -
Declaration
final ModifiablecheckModify(Locloc, Scope*sc, Expressione1, ModifyFlagsflag);Check to see if declaration can be modified in this context (
sc). Issue error if not.Parameters
Locloclocation for error messages
Expressione1nullorthisexpression when this declaration is a fieldScope*sccontext
ModifyFlagsflagif the first bit is set it means do not issue error message for invalid modification; if the second bit is set, it means that this declaration is a field and a subfield of it is modified.
Return Value
Modifiable.yes or Modifiable.initialization
-
Declaration
final const LINKresolvedLinkage();Returns the linkage, resolving the target-specific
Systemone. -
Declaration
final const pure nothrow @nogc @safe boolisReference();Return Value
Whether the variable is a reference, annotated with
outorref
-
-
Declaration
classTupleDeclaration: dmd.declaration.Declaration;-
Declaration
voidforeachVar(scope void delegate(Dsymbol)dg);Calls
dg(Dsymbol) for each Dsymbol, which should be a VarDeclaration inside VarExp (isexp ==true).Parameters
void delegate(Dsymbol)dgdelegate to call for each Dsymbol
-
Declaration
intforeachVar(scope int delegate(Dsymbol)dg);Calls
dg(Dsymbol) for each Dsymbol, which should be a VarDeclaration inside VarExp (isexp ==true). Ifdgreturns !=0, stops and returns that value else returns 0.Parameters
int delegate(Dsymbol)dgdelegate to call for each Dsymbol
Return Value
last value returned by
dg()
-
-
Declaration
classAliasDeclaration: dmd.declaration.Declaration;-
Declaration
const boolisAliasedTemplateParameter();Return Value
trueif this instance was created to make a template parameter visible in the scope of a template body,falseotherwise
-
-
Declaration
classOverDeclaration: dmd.declaration.Declaration; -
Declaration
classVarDeclaration: dmd.declaration.Declaration;-
Declaration
final boolisDataseg();Does symbol go into data segment? Includes extern variables.
-
Declaration
final boolisThreadlocal();Does symbol go into thread local storage?
-
Declaration
final boolisCTFE();Can variable be read and written by CTFE?
-
Declaration
final boolcanTakeAddressOf();Return
trueif we can take the address of this variable. -
Declaration
final boolneedsScopeDtor();Return
trueif variable needs to call the destructor. -
Declaration
final ExpressioncallScopeDtor(Scope*sc);If a variable has a scope destructor call, return call for it. Otherwise, return NULL.
-
Declaration
final ExpressiongetConstInitializer(boolneedFullType= true);If variable has a constant expression initializer, get it. Otherwise, return
null. -
Declaration
final ExpressionexpandInitializer(Locloc);Helper function for the expansion of manifest constant.
-
Declaration
final boolcheckNestedReference(Scope*sc, Locloc);Check to see if this variable is actually in an enclosing function rather than the current one. Update nestedrefs[], closureVars[] and outerVars[].
Return Value
trueif error occurs.
-
-
Declaration
classBitFieldDeclaration: dmd.declaration.VarDeclaration;C11 6.7.2.1-4 bit fields
-
Declaration
final ulonggetMinMax(Identifierid);Retrieve the .min or .max values. Only valid after semantic analysis.
Parameters
IdentifieridId.min or Id.max
Return Value
the min or max value
-
-
Declaration
classSymbolDeclaration: dmd.declaration.Declaration;This is a shell around a back end symbol
-
Declaration
classTypeInfoDeclaration: dmd.declaration.VarDeclaration; -
Declaration
classTypeInfoStructDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoClassDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoInterfaceDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoPointerDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoArrayDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoStaticArrayDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoAssociativeArrayDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoEnumDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoFunctionDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoDelegateDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoTupleDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoConstDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoInvariantDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoSharedDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoWildDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classTypeInfoVectorDeclaration: dmd.declaration.TypeInfoDeclaration; -
Declaration
classThisDeclaration: dmd.declaration.VarDeclaration;For the "this" parameter to member functions