This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate another class.
ClosedPublic

Authored by NoQ on Dec 13 2018, 3:18 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.Dec 13 2018, 3:18 PM
NoQ edited the summary of this revision. (Show Details)Dec 13 2018, 3:19 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 14 2018, 6:12 PM
This revision was automatically updated to reflect the committed changes.