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
Type: Scope*

used to determine current function and module

fdc

function being called, null if called indirectly

par
Type: Parameter

function parameter (this if null)

arg

initializer for param

assertmsg
Type: bool

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

gag
Type: bool

do not print error messages

Return Value

Type: bool

true if pointers to the stack can escape via assignment

Meta