[PATCH] WIP Fix for temporary destructors in conditionals

Pavel Labath labath at google.com
Tue Aug 6 09:26:01 PDT 2013

On 6 August 2013 17:54, Jordan Rose <jordan_rose at apple.com> wrote:

>   What's the destructor look like for "`A arr[2]`"? I believe that should
> already be handled, even if it's just a very early special case to bail
> out. If so, you should be able to do something similar for temporary
> destructors.
Ok, it seems I still get an (implicit) array destructor even if I declare
the array as 'const A x[2] = { A(), A() };', so I guess it must be handled
somehow. I'll try to find the logic and emulate it for temporary
However, there is one more detail:
in the implicit case, the array is destroyed *after* the members of the
array. However, in the original initializer_list case, the array is
actually destroyed before the elements. Does this matter? Should I also
change the destructor order in the CFG while I'm digging through there?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130806/bda4f9fd/attachment.html>

More information about the cfe-commits mailing list