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

Parameters

sc
Type: Scope*

used to determine current function and module

e

AssignExp or CatAssignExp to check for any pointers to the stack

gag
Type: bool

do not print error messages

Return Value

Type: bool

true if pointers to the stack can escape via assignment

Meta