]> granicus.if.org Git - clang/commitdiff
Add method that will be invoked using the dot-syntax just to test that the missing...
authorTed Kremenek <kremenek@apple.com>
Thu, 30 Oct 2008 23:00:13 +0000 (23:00 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 30 Oct 2008 23:00:13 +0000 (23:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58467 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/PR2978.m

index 9200412fbdb8c9a53e5749429c50f597ae174179..69deec9860d7c0b3dc68349536ca2148d2f14207 100644 (file)
@@ -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];
 }