dcoughlin added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp:165
@@ +164,3 @@
+ if (Desc.empty())
+ Desc = "use of 'self' after it is freed with call to [super dealloc]";
+
----------------
zaks.anna wrote:
> Does "has been freed" sound better?
Yes, changed it.
================
Comment at: test/Analysis/DeallocUseAfterFreeErrors.m:59
@@ +58,3 @@
+ [super dealloc]; // expected-note {{[super dealloc] called here}}
+ _delegate = nil; // expected-warning {{use of 'self' after it is freed with
call to [super dealloc]}}
+ // expected-note@-1 {{use of 'self' after it is freed with call to
[super dealloc]}}
----------------
zaks.anna wrote:
> Would it be possible to provide a more presice error message here?
> Specifically, we refer to 'self' here but the reference is implicit. I guess
> we could say something like "accessing an instance variable after the object
> has been freed". Would that require extra checking to ensure that we are
> indeed accessing a member in checkLocation?
I've updated this to be "use of instance variable '_ivar' after the instance
has been freed with call to [super dealloc]".
Repository:
rL LLVM
http://reviews.llvm.org/D17528
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits