View source code
Display the source code in dmd/escape.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function dmd.escape.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; }

void escapeByValue (
  Expression e,
  EscapeByResults* er,
  bool live = false
);

No side effects.

Parameters

NameDescription
e expression to be returned by value
er where to place collected data
live if @live semantics apply, i.e. expressions p, *p, **p, etc., all return p.

Authors

Walter Bright

License

Boost License 1.0