Author: kremenek
Date: Mon Dec 8 15:59:21 2008
New Revision: 60720
URL: http://llvm.org/viewvc/llvm-project?rev=60720&view=rev
Log:
Add test case for <rdar://problem/6380411>.
Added:
cfe/trunk/test/Analysis/MissingDealloc.m
Added: cfe/trunk/test/Analysis/MissingDealloc.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/MissingDealloc.m?rev=60720&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/MissingDealloc.m (added)
+++ cfe/trunk/test/Analysis/MissingDealloc.m Mon Dec 8 15:59:21 2008
@@ -0,0 +1,23 @@
+// RUN: clang -warn-objc-missing-dealloc
'-DIBOutlet=__attribute__((iboutlet))' %s --verify
+typedef signed char BOOL;
[EMAIL PROTECTED] NSObject - (BOOL)isEqual:(id)object; @end
[EMAIL PROTECTED] NSObject <NSObject> {}
+- (void)dealloc;
[EMAIL PROTECTED]
+
+// <rdar://problem/6380411>: 'myproperty' has kind 'assign' and thus the
+// assignment through the setter does not perform a release.
+
[EMAIL PROTECTED] MyObject : NSObject {
+ id _myproperty;
+}
[EMAIL PROTECTED](assign) id myproperty;
[EMAIL PROTECTED]
+
[EMAIL PROTECTED] MyObject
[EMAIL PROTECTED] myproperty=_myproperty; // no-warning
+- (void)dealloc {
+ self.myproperty = 0;
+ [super dealloc];
+}
[EMAIL PROTECTED]
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits