]> granicus.if.org Git - clang/commit
[analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate a class.
authorArtem Dergachev <artem.dergachev@gmail.com>
Sat, 15 Dec 2018 02:09:02 +0000 (02:09 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Sat, 15 Dec 2018 02:09:02 +0000 (02:09 +0000)
commit2b29b6937bcb5f43b5572b70837a6374b43927c5
tree7a9d9413df6af756e728edb9df43974c7a6f28f2
parent3f894f43adbc9b83099587e1898fc339cda98f8b
[analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate a class.

The checker wasn't prepared to see the dealloc message sent to the class itself
rather than to an instance, as if it was +dealloc.

Additionally, it wasn't prepared for pure-unknown or undefined self values.
The new guard covers that as well, but it is annoying to test because
both kinds of values shouldn't really appear and we generally want to
get rid of all of them (by modeling unknown values with symbols and
by warning on use of undefined values before they are used).

The CHECK: directive for FileCheck at the end of the test looks useless,
so i removed it.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349228 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
test/Analysis/MissingDealloc.m