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

used to determine current function and module

e

expression to check

gag
Type: bool

do not print error messages

Return Value

Type: bool

true if references to the stack can escape

Meta