]> granicus.if.org Git - clang/commit
[CFG] Make representation of destructor calls more accurate.
authorArtem Dergachev <artem.dergachev@gmail.com>
Wed, 28 Aug 2019 18:44:42 +0000 (18:44 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Wed, 28 Aug 2019 18:44:42 +0000 (18:44 +0000)
commit4c11f17103c599c2af4fffcd5d670e495119cc0c
treeb29200c0cd7d25c173f27ffe3cdb9753656b5b53
parent8c28a172b77676d2c7fc957ec2761e8da8a3e318
[CFG] Make representation of destructor calls more accurate.

Respect C++17 copy elision; previously it would generate destructor calls
for elided temporaries, including in initialization and return statements.

Don't generate duplicate destructor calls for statement expressions.

Fix destructors in initialization lists and comma operators.

Improve printing of implicit destructors.

Patch by Nicholas Allegra!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370247 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/CFG.cpp
test/Analysis/auto-obj-dtors-cfg-output.cpp
test/Analysis/cfg-rich-constructors.cpp
test/Analysis/cfg-rich-constructors.mm
test/Analysis/cfg.cpp
test/Analysis/missing-bind-temporary.cpp
test/Analysis/more-dtors-cfg-output.cpp [new file with mode: 0644]
test/Analysis/scopes-cfg-output.cpp
test/Analysis/temporaries.cpp