]> granicus.if.org Git - clang/commit
[CFG] Provide construction contexts when constructors have cleanups.
authorArtem Dergachev <artem.dergachev@gmail.com>
Sat, 10 Feb 2018 02:46:14 +0000 (02:46 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Sat, 10 Feb 2018 02:46:14 +0000 (02:46 +0000)
commit2640a027034cf536fdfa21ff7f39f787fc0e1fbf
tree192bffd46641a078c5bfa9dc4fa0d6d6d08a5c36
parenta5f94fbb04acb102278df12f46876baf568e7200
[CFG] Provide construction contexts when constructors have cleanups.

Now that we make it possible to query the CFG constructor element to find
information about the construction site, possible cleanup work represented by
ExprWithCleanups should not prevent us from providing this information.

This allows us to have a correct construction context for variables initialized
"by value" via elidable copy-constructors, such as 'i' in

  iterator i = vector.begin();

Differential Revision: https://reviews.llvm.org/D42719

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324798 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/CFG.cpp
test/Analysis/cfg-rich-constructors.cpp
test/Analysis/temp-obj-dtors-cfg-output.cpp