zaks.anna 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]";
+
----------------
Does "has been freed" sound better?

================
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]}}
----------------
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?


http://reviews.llvm.org/D17528



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to