Adding local scope and automatic object destructors

Manuel Klimek klimek at google.com
Tue Jul 29 06:51:53 PDT 2014


Hi Jordan,

I am working on a fix for lifetime extended temporaries, and I have a hard
time understanding some of the code.
1. addLocalScopeForVarDecl already has a FIXME; I have no idea how to apply
that though - it seems like we always add the VarDecl to the scope, even if
the type we look at is from the lifetime extended temporary; as noted, we
need to be able to handle the scope of multiple lifetime extended
temporaries; do we need a completely different approach here then?
2. addAutomaticObjDtors seems to work on what addLocalScopeForVarDecl does,
so it seems like we'll need to adapt this after solving (1)

My main problem is that I don't have enough insight into what else the
local scope is used for, so I'm not sure how we'd want to change it to
account for lifetime extended temporaries.

Cheers,
/Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140729/35ba234e/attachment.html>


More information about the cfe-commits mailing list