[PATCH] D45650: [CFG] [analyzer] Don't treat argument constructors as temporary constructors.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 13 20:21:18 PDT 2018


NoQ updated this revision to Diff 142505.
NoQ added a comment.

Add tests where the argument is passed by reference. These tests work correctly (i.e. they correctly identify the argument constructor as a temporary constructor) because such constructors would include a `MaterializeTemporaryExpr` that is not allowed in the //middle// of the partial construction context. For the same reason remove the defensive check in the branch of `ConstructionContext::createFromLayers` that deals with `MaterializeTemporaryExpr`-based layers.


https://reviews.llvm.org/D45650

Files:
  lib/Analysis/CFG.cpp
  lib/Analysis/ConstructionContext.cpp
  test/Analysis/cfg-rich-constructors.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45650.142505.patch
Type: text/x-patch
Size: 5218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180414/b6344788/attachment.bin>


More information about the cfe-commits mailing list