[PATCH] D44120: [CFG] [analyzer] Heavier CFGValueTypedCall elements.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 5 15:20:20 PST 2018

NoQ created this revision.
NoQ added reviewers: rsmith, dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.

https://reviews.llvm.org/D42672 has added extra context to construction calls in the CFG so that the users, such as the analyzer, didn't have to peek ahead in order to figure out what sort of constructor is being called. The same seems to be necessary for arbitrary functions that return C++ objects by value (as opposed to by reference).

One of the use cases for such extra context at the call site would be to perform any sort of inter-procedural analysis that involves functions returning objects by value. In this case the elidable constructor at the return site would construct the object explained by the context at the call site, and its lifetime would also be managed by the caller, not the callee.

The extra context would also be useful for properly handling the return-value temporary at the call site, even if the callee is not being analyzed inter-procedurally.

  rC Clang



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44120.137091.patch
Type: text/x-patch
Size: 20130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180305/7522c936/attachment-0001.bin>

More information about the cfe-commits mailing list