By now I think I'm completely out of my league here.
Lambdas seem to be modeled very differently from other things in the AST:
1. The lambda decl has its own CXXBindTemporary (as the lambda itself is
like a construction of a class)
2. the capture statement has its own CXXBindTemporary

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) :)



On Wed, May 28, 2014 at 3:38 PM, Manuel Klimek <[email protected]> wrote:

> 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 ;)
>
>
> On Wed, May 28, 2014 at 3:04 PM, Manuel Klimek <[email protected]> wrote:
>
>> FYI, note that this test would fail miserably at trunk, too..
>>
>>
>> On Wed, May 28, 2014 at 3:03 PM, Manuel Klimek <[email protected]> wrote:
>>
>>> Do not recursively visit lambdas for temporaries. This fixes the CFG,
>>> but does
>>> not yet fix what we can reach.
>>>
>>> http://reviews.llvm.org/D3627
>>>
>>> Files:
>>>   include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
>>>   include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
>>>   include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
>>>   lib/Analysis/CFG.cpp
>>>   lib/StaticAnalyzer/Core/CoreEngine.cpp
>>>   lib/StaticAnalyzer/Core/ExprEngine.cpp
>>>   lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
>>>   test/Analysis/temp-obj-dtors-cfg-output.cpp
>>>   test/Analysis/temporaries.cpp
>>>
>>
>>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to