On Wed, Jul 30, 2014 at 4:37 AM, Jordan Rose <[email protected]> wrote:

> Can you add a test for the subobject case too, even though that doesn't
> work yet either?
>
>     const LifetimeExtend &ref = Aggregate{ 0, 1 }.a;
>     6;
>     // expect ~Aggregate here rather than ~LifetimeExtend
>

Unfortunately, I can't add the test - the problem is that this currently
crashes - my other patch will fix this (with tests :)


> Other than that, this seems like a fine incremental improvement.
>
> ================
> Comment at: test/Analysis/cfg.cpp:421-429
> @@ +420,11 @@
> +  }
> +  // CHECK: LifetimeExtend(5)
> +  // CHECK-NEXT: : 5
> +  // FIXME: We want to emit the destructors of the lifetime
> +  // extended variables here.
> +  // CHECK-NOT: ~LifetimeExtend()
> +  {
> +    AggregateRef a{LifetimeExtend(5), LifetimeExtend(5)};
> +    5;
> +  }
> +  // FIXME: Add tests for lifetime extension via subobject
> ----------------
> I did not realize this worked. Huh. That's going to be fun.
>

My other patch also addresses this problem (it's not actually that much of
a problem, we just can't use the VarDecl as anchor any more).


>
> http://reviews.llvm.org/D4696
>
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to