[PATCH] D43062: [analyzer] Support CXXTemporaryObjectExpr constructors that have destructors.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 20:04:35 PST 2018


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.
NoQ added a dependency: D43056: [CFG] [analyzer] Add construction context for CXXBindTemporaryExpr..

Patch https://reviews.llvm.org/D43056 adds support for such `CXXTemporaryObjectExpr` kind of constructors in the CFG. Here i add a straightforward analyzer-side support.

Note that when we don't have destructors (i.e. we have trivial destructors), the analyzer inlines the temporary constructor regardless of whether it has a destructor in the CFG or not, actually also regardless of whether the target region is correct, so it kinda worked before, in simple cases.


Repository:
  rC Clang

https://reviews.llvm.org/D43062

Files:
  lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  test/Analysis/temporaries.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43062.133363.patch
Type: text/x-patch
Size: 4586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180208/97e55363/attachment.bin>


More information about the cfe-commits mailing list