We should treat blocks the same as lambdas. How about GNU StmtExprs?
if (check(OtherDtor()) &&
({ int x = 1; NoReturnDtor(); x + 1})) { ... }
To be fair, I'm not even sure how those are //supposed// to behave.
I'm not sure how your last-bind trick really works. In this code:
First() && (Second() || Second()) && Third()
none of the temporaries can be aggregated, but I'm not sure how
LastBoundTemporary accomplishes that, even given your explanation.
Can we start with the inefficient version that tests every temporary
individually, and then consolidate afterwards?
================
Comment at: test/Analysis/temporaries.cpp:336-338
@@ +335,5 @@
+ ++y;
+ // Test that the CFG gets hooked up correctly when temporary destructors
+ // are handled after a statically known branch condition.
+ true ? (void)0 : (void)check(NoReturnDtor());
+ }
----------------
If this is the right test, then the comment was all I really wanted. There is
of course a difference between this and the if-statement — the destructor here
is in the same full-expression as the condition.
http://reviews.llvm.org/D3627
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits