[PATCH] D47658: [analyzer] Re-enable lifetime extension for temporaries with destructors and bring back static temporaries.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 1 14:55:45 PDT 2018
NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs.
Herald added subscribers: cfe-commits, baloghadamsoftware.
I don't remember why lifetime extension for temporaries without destructors was disabled. It's clearly less important and is a different syntax to support, so i guess i simply didn't want to pretend that it works before i tested it, but it generally seems to be pretty much the same.
Added a simple test to test this.
One thing i noticed when i re-enabled such lifetime extension was that we had tests for "static temporaries" (i.e. temporaries lifetime-extended by static or global variables) which started to fail, so i had to fix them as well, which wasn't hard.
Repository:
rC Clang
https://reviews.llvm.org/D47658
Files:
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
test/Analysis/lifetime-extension.cpp
test/Analysis/temporaries-callback-order.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47658.149560.patch
Type: text/x-patch
Size: 4525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180601/55e2d7ea/attachment-0001.bin>
More information about the cfe-commits
mailing list