escapeByValue

e is an expression to be returned by value, and that value contains pointers. Walk e to determine which variables are possibly being returned by value, such as: int* function(int* p) { return p; } If e is a form of &p, determine which variables have content which is being returned as ref, such as: int* function(int i) { return &i; } Multiple variables can be inserted, because of expressions like this: int function(bool b, int i, int* p) { return b ? &i : p; }

No side effects.

void
escapeByValue
(,,
bool live = false
,
bool retRefTransition = false
)

Parameters

e Expression

expression to be returned by value

er EscapeByResults*

where to place collected data

live bool

if @live semantics apply, i.e. expressions p, *p, **p, etc., all return p.

Meta