[cfe-commits] r58467 - /cfe/trunk/test/Analysis/PR2978.m
Ted Kremenek
kremenek at apple.com
Thu Oct 30 16:00:13 PDT 2008
Author: kremenek
Date: Thu Oct 30 18:00:13 2008
New Revision: 58467
URL: http://llvm.org/viewvc/llvm-project?rev=58467&view=rev
Log:
Add method that will be invoked using the dot-syntax just to test that the missing -dealloc checker handles it.
Modified:
cfe/trunk/test/Analysis/PR2978.m
Modified: cfe/trunk/test/Analysis/PR2978.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/PR2978.m?rev=58467&r1=58466&r2=58467&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/PR2978.m (original)
+++ cfe/trunk/test/Analysis/PR2978.m Thu Oct 30 18:00:13 2008
@@ -26,6 +26,8 @@
@property(retain) id M;
@property(retain) id V;
@property(retain) id W;
+-(id) O;
+-(void) setO: (id) arg;
@end
@implementation MyClass
@@ -38,6 +40,9 @@
@synthesize V = _V;
@synthesize W = _W; // expected-warning{{The '_W' instance variable was retained by a synthesized property but wasn't released in 'dealloc'}}
+-(id) O{ return 0; }
+-(void) setO:(id)arg { }
+
- (void)dealloc
{
[_X release];
@@ -47,7 +52,7 @@
self.M = 0; // This will release '_M'
[self setV:0]; // This will release '_V'
[self setW:@"newW"]; // This will release '_W', but retain the new value
-
+ self.O = 0; // no-warning
[super dealloc];
}
More information about the cfe-commits
mailing list