<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 7, 2014 at 6:48 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you add an assertion at the end of a block that there are no outstanding temporary destructors in the current stack frame? That seems useful.<br>
</blockquote><div><br></div><div>Do you mean at the end of a VisitBlockDecl?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
================<br>
Comment at: lib/Analysis/CFG.cpp:3583<br>
@@ -3512,4 +3582,3 @@<br>
     if (Stmt *Child = *I)<br>
-      if (CFGBlock *R = VisitForTemporaryDtors(Child))<br>
-        B = R;<br>
+      if (CFGBlock *R = VisitForTemporaryDtors(Child, false, Context)) B = R;<br>
   }<br>
----------------<br>
Lost a newline here.<br>
<br>
================<br>
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:681-686<br>
@@ -663,1 +680,8 @@<br>
   QualType varType = D.getBindTemporaryExpr()->getSubExpr()->getType();<br>
+  for (ExplodedNode *Node : CleanDtorState) {<br>
+    // FIXME: Inlining of temporary destructors is not supported yet anyway, so<br>
+    // we just put a NULL region for now. This will need to be changed later.<br>
+    VisitCXXDestructor(varType, nullptr, D.getBindTemporaryExpr(),<br>
+                       /*IsBase=*/false, Node, Dst);<br>
+  }<br>
+}<br>
----------------<br>
I'm not sure you're supposed to reuse `Dst` with multiple builders. However, you know there's only one node in `CleanDtorState`, so you should be able to just skip the loop.<br>
<br>
<a href="http://reviews.llvm.org/D3627" target="_blank">http://reviews.llvm.org/D3627</a><br>
<br>
<br>
</blockquote></div><br></div></div>