checkParamArgumentEscape

Function parameter par is being initialized to arg, and par may escape. Detect if scoped values can escape this way. Print error messages when these are detected.

bool
checkParamArgumentEscape

Parameters

sc Scope*

used to determine current function and module

fdc FuncDeclaration

function being called, null if called indirectly

par Parameter

function parameter (this if null)

arg Expression

initializer for param

assertmsg bool

true if the parameter is the msg argument to assert(bool, msg).

gag bool

do not print error messages

Return Value

Type: bool

true if pointers to the stack can escape via assignment

Meta