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'"
+
+...@interface MyObject_rdar6380411 : NSObject {
+ id _myproperty;
+}
+...@property(assign) id myproperty;
+...@end
+
+...@implementation MyObject_rdar6380411
+...@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];
+}
+...@end
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits