[cfe-dev] Adding lifetime begin/end to unnamed temporaries

Reid Kleckner rnk at google.com
Thu Jul 31 09:47:48 PDT 2014


On Thu, Jul 31, 2014 at 1:20 AM, Renato Golin <renato.golin at linaro.org>
wrote:

> Hi Arnaud,
>
> Can't this affect debugging as well?
>
> I mean, if you run this on O1 or less, you'll have a lot more variables
> optimised away, especially at the end of the function, and at higher
> optimisation levels you'll have a lot less variables to care about.
>
This would apply to unnamed temporaries, which presumably have no debug
info and can't be examined in a debugger.

As to his actual question, I have no idea. Lifetime of C++ temporaries is
subtle. I always have to defer to Richard and John. The static analysis
guys are having a similar pile of trouble figuring out where to insert
calls to C++ destructors in the CFG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140731/af474aa3/attachment.html>


More information about the cfe-dev mailing list