]> granicus.if.org Git - clang/commit
[analyzer] Warn on use of 'self' after call to to [super dealloc].
authorDevin Coughlin <dcoughlin@apple.com>
Thu, 25 Feb 2016 23:36:52 +0000 (23:36 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Thu, 25 Feb 2016 23:36:52 +0000 (23:36 +0000)
commitb6d0b32d8e303d32d346400f307e298e40e2a51c
tree2e3bde8ab115e361fe82f33e0f14533600f4d297
parent9fa9ac21a0ec76ce2837527844b117bb420b071c
[analyzer] Warn on use of 'self' after call to to [super dealloc].

Referring to 'self' after a call to [super dealloc] is a use-after-free in
Objective-C because NSObject's -dealloc frees the memory pointed to by self.
This patch extends the ObjCSuperDeallocChecker to catch this error.

rdar://problem/6953275

Differential Revision: http://reviews.llvm.org/D17528

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