]> granicus.if.org Git - clang/commit
[analyzer] Implement path notes for temporary destructors.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 15 Feb 2018 19:28:21 +0000 (19:28 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 15 Feb 2018 19:28:21 +0000 (19:28 +0000)
commitf549cfdc5ea1ae436ce6e5c94b27afafbe672fc9
tree612e182624a098e021ec37a2043a95030c15d933
parentf337a760516c29af3e3701260bb2b79cade1534d
[analyzer] Implement path notes for temporary destructors.

Temporary destructors fire at the end of the full-expression. It is reasonable
to attach the path note for entering/leaving the temporary destructor to its
CXXBindTemporaryExpr. This would not affect lifetime-extended temporaries with
their automatic destructors which aren't temporary destructors.

The path note may be confusing in the case of destructors after elidable copy
constructors.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325284 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
test/Analysis/inlining/temp-dtors-path-notes.cpp [new file with mode: 0644]