diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-10-30 23:00:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-10-30 23:00:13 +0000 |
commit | ccb55e3d0c173ed86ab440d9bf41c06fdddd39ef (patch) | |
tree | be88fc50e88f8c2c5268b0ea06f52e7a84982016 | |
parent | 8bdf9b96e56ad0f6e1c5e3fdb730aceb35a81042 (diff) |
Add method that will be invoked using the dot-syntax just to test that the missing -dealloc checker handles it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58467 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/PR2978.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Analysis/PR2978.m b/test/Analysis/PR2978.m index 9200412fbd..69deec9860 100644 --- a/test/Analysis/PR2978.m +++ b/test/Analysis/PR2978.m @@ -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]; } |