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
enum STCSTCFlowThruAggregate;for an AggregateDeclaration
-
Declaration
enum STCSTCFlowThruFunction;for a FuncDeclaration
-
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, intflag);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
intflag!=0 means do not issue error message for invalid modification
Return Value
Modifiable.yes or Modifiable.initialization
-
-
Declaration
classTupleDeclaration: dmd.declaration.Declaration; -
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
final const pure boolenclosesLifetimeOf(VarDeclarationv);Determine if
thishas a lifetime that lasts past the destruction ofvParameters
VarDeclarationvvariable to test against
Return Value
trueif it does -
Declaration
final voidaddMaybe(VarDeclarationv);Add variable to maybes[]. When a maybescope variable
is assigned to a maybescope variablevthis, we cannot determine ifthisis actually scope until the semantic analysis for the function is completed. Thus, we save the data until then.Parameters
VarDeclarationvan STC.maybescope variable that was assigned to
this
-
-
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