[cfe-commits] r64257 - /cfe/trunk/test/Analysis/MissingDealloc.m

Ted Kremenek kremenek at apple.com
Tue Feb 10 15:41:52 PST 2009


Author: kremenek
Date: Tue Feb 10 17:41:52 2009
New Revision: 64257

URL: http://llvm.org/viewvc/llvm-project?rev=64257&view=rev
Log:
Add another test case for the MissingDealloc checker.

Modified:
    cfe/trunk/test/Analysis/MissingDealloc.m

Modified: cfe/trunk/test/Analysis/MissingDealloc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/MissingDealloc.m?rev=64257&r1=64256&r2=64257&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/MissingDealloc.m (original)
+++ cfe/trunk/test/Analysis/MissingDealloc.m Tue Feb 10 17:41:52 2009
@@ -63,3 +63,23 @@
 @implementation HasOutlet // no-warning
 @end
 
+//===------------------------------------------------------------------------===
+// <rdar://problem/6380411>
+// Was bogus warning: "The '_myproperty' instance variable was not retained by a
+//  synthesized property but was released in 'dealloc'"
+
+ at interface MyObject_rdar6380411 : NSObject {
+    id _myproperty;
+}
+ at property(assign) id myproperty;
+ at end
+
+ at implementation MyObject_rdar6380411
+ at synthesize myproperty=_myproperty;
+- (void)dealloc {
+    // Don't claim that myproperty is released since it the property
+    // has the 'assign' attribute.
+    self.myproperty = 0; // no-warning
+    [super dealloc];
+}
+ at end





More information about the cfe-commits mailing list