]> granicus.if.org Git - clang/commit
[analyzer] MisusedMovedObject: Fix state-resetting a base-class sub-object.
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 10 Oct 2017 11:55:56 +0000 (11:55 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 10 Oct 2017 11:55:56 +0000 (11:55 +0000)
commit18e9d0430b722cf77afe96262f6d16f3c9c8a8b6
tree803194613ae367961213cee42912097de2dc1e44
parentc91d03cade3e7c025e869d1c6cff61151151f6f0
[analyzer] MisusedMovedObject: Fix state-resetting a base-class sub-object.

If a method is resetting the state of an object that was moved from, it should
be safe to use this object again. However if the method was defined in a parent
class, but used in a child class, the reset didn't happen from the checker's
perspective.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315301 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MisusedMovedObjectChecker.cpp
test/Analysis/MisusedMovedObject.cpp