<div dir="ltr">Ping :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 10:59 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We still have the question about what to do with the FoldingSetNode for pairs in the other patch open.<br>
<div class=""><br>
================<br>
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:765-766<br>
@@ +764,4 @@<br>
+ ExplodedNodeSet Next;<br>
+ VisitCXXBindTemporaryExpr(cast<CXXBindTemporaryExpr>(S), Pred, PreVisit,<br>
+ Next);<br>
+ getCheckerManager().runCheckersForPostStmt(Dst, Next, S, *this);<br>
----------------<br>
</div><div class="">Jordan Rose wrote:<br>
> Why is `Pred` being passed here? The `PreVisit` set has the same information.<br>
</div>Done.<br>
<div class=""><br>
================<br>
Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:521-527<br>
@@ +520,9 @@<br>
+ }<br>
+ StmtNodeBuilder StmtBldr(PreVisit, Dst, *currBldrCtx);<br>
+ ProgramStateRef State = Pred->getState();<br>
+ assert(!State->contains<InitializedTemporariesSet>(<br>
+ std::make_pair(BTE, Pred->getStackFrame())));<br>
+ State = State->add<InitializedTemporariesSet>(<br>
+ std::make_pair(BTE, Pred->getStackFrame()));<br>
+ StmtBldr.generateNode(BTE, Pred, State);<br>
+}<br>
----------------<br>
</div><div class="">Jordan Rose wrote:<br>
> Right, this is not correct. We need to iterate over the nodes in the pre-visit set and update //all// of them to generate `Dst`.<br>
</div>/me headdesks. Done. I'm still not sure I understand all the necessary pieces to generate new nodes (and have no idea how to write tests that trigger the corner cases), so I'd appreciate another careful look (or some test ideas).<br>
<div class=""><br>
================<br>
Comment at: test/Analysis/temporaries.cpp:291-294<br>
@@ +290,6 @@<br>
+ void testNestedFullStatements() {<br>
+ []() { check(NoReturnDtor()); } != nullptr || check(Dtor());<br>
+ // The CFG for this now looks correct, but we still do not reach the line<br>
+ // below.<br>
+ clang_analyzer_warnIfReached(); // FIXME: Should warn.<br>
+ }<br>
----------------<br>
</div><div class="">Jordan Rose wrote:<br>
> I don't think we assume that lambda-exprs are always non-null. We should.<br>
</div>It's much worse. We currently ignore lambdas. I updated the test / added a comment.<br>
<br>
<a href="http://reviews.llvm.org/D3627" target="_blank">http://reviews.llvm.org/D3627</a><br>
<br>
<br>
</blockquote></div><br></div>