checkAssignEscape

Given an AssignExp, determine if the lvalue will cause the contents of the rvalue to escape. Print error messages when these are detected. Infer scope attribute for the lvalue where possible, in order to eliminate the error.

bool
checkAssignEscape
(,,
bool gag
,
bool byRef
)

Parameters

sc Scope*

used to determine current function and module

e Expression

AssignExp or CatAssignExp to check for any pointers to the stack

gag bool

do not print error messages

byRef bool

set to true if e1 of e gets assigned a reference to e2

Return Value

Type: bool

true if pointers to the stack can escape via assignment

Meta