[PATCH] D42719: [CFG] [analyzer] Add construction context when constructor is wrapped into ExprWithCleanups.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 30 16:01:24 PST 2018


NoQ created this revision.
NoQ added reviewers: rsmith, dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.

As an improvement over https://reviews.llvm.org/D42699 and https://reviews.llvm.org/D42700, this unwraps `ExprWithCleanups` surrounding immediate constructors of variables which take temporaries as constructor arguments (such as `iterator i = begin()` - a copy constructor accepts a temporary here).

With this change, we're fully ready to make use of construction contexts in the analyzer (in the next patch). Once we do, the plan is to be adding more and more construction contexts for the new cases that were not previously supported by the analyzer.

Minor refactoring involved.


Repository:
  rC Clang

https://reviews.llvm.org/D42719

Files:
  include/clang/Analysis/CFG.h
  lib/Analysis/CFG.cpp
  test/Analysis/temp-obj-dtors-cfg-output.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42719.132073.patch
Type: text/x-patch
Size: 6415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180131/5983eb4f/attachment.bin>


More information about the cfe-commits mailing list