<div dir="ltr">By now I think I'm completely out of my league here.<div>Lambdas seem to be modeled very differently from other things in the AST:</div><div>1. The lambda decl has its own CXXBindTemporary (as the lambda itself is like a construction of a class)</div>
<div>2. the capture statement has its own CXXBindTemporary</div><div><br></div><div>I don't think we want to insert the temp dtors into the CFG after the lambda declaration, as the result of the capture initializer seems to always be bound to the lifetime of the lambda (I have no idea whether that's correct, though) :)</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 28, 2014 at 3:38 PM, 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"><div dir="ltr">And one more update: apparently we have to at least visit the captures for by-value captures (just like VisitLambda does, I should have looked there in the first place ;)</div>
<div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Wed, May 28, 2014 at 3:04 PM, 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">

<div dir="ltr">FYI, note that this test would fail miserably at trunk, too..</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 28, 2014 at 3:03 PM, 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">Do not recursively visit lambdas for temporaries. This fixes the CFG, but does<br>
not yet fix what we can reach.<br>
<div><div><br>
<a href="http://reviews.llvm.org/D3627" target="_blank">http://reviews.llvm.org/D3627</a><br>
<br>
Files:<br>
  include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h<br>
  include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h<br>
  include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h<br>
  lib/Analysis/CFG.cpp<br>
  lib/StaticAnalyzer/Core/CoreEngine.cpp<br>
  lib/StaticAnalyzer/Core/ExprEngine.cpp<br>
  lib/StaticAnalyzer/Core/ExprEngineCXX.cpp<br>
  test/Analysis/temp-obj-dtors-cfg-output.cpp<br>
  test/Analysis/temporaries.cpp<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>