checkReturnEscapeRef

Detect cases where returning e by ref can result in a reference to the stack being returned. Print error messages when these are detected.

bool
checkReturnEscapeRef

Parameters

sc Scope*

used to determine current function and module

e Expression

expression to check

gag bool

do not print error messages

Return Value

Type: bool

true if references to the stack can escape

Meta