]> granicus.if.org Git - clang/commit
[analyzer] MoveChecker: NFC: Remove the workaround for the "zombie symbols" bug.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 3 Dec 2018 22:44:16 +0000 (22:44 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 3 Dec 2018 22:44:16 +0000 (22:44 +0000)
commita0c4e6d99245edc660e70b6be8156c4de6c0e43e
tree2bc972904dcc41ed978572a25e2497035081bb3c
parent781fcf11974d4aac64d5b2049c1742487400eb01
[analyzer] MoveChecker: NFC: Remove the workaround for the "zombie symbols" bug.

The checker had extra code to clean up memory regions that were sticking around
in the checker without ever being cleaned up due to the bug that was fixed in
r347953. Because of that, if a region was moved from, then became dead,
and then reincarnated, there were false positives.

Why regions are even allowed to reincarnate is a separate story. Luckily, this
only happens for local regions that don't produce symbols when loaded from.

No functional change intended. The newly added test demonstrates that even
though no cleanup is necessary upon destructor calls, the early return
cannot be removed. It was not failing before the patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348208 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MoveChecker.cpp
test/Analysis/use-after-move.cpp