From 183c6f2db89ae7f79003978b4d80c51ff76f6deb Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 10 Feb 2009 23:41:52 +0000 Subject: [PATCH] Add another test case for the MissingDealloc checker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64257 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/MissingDealloc.m | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/Analysis/MissingDealloc.m b/test/Analysis/MissingDealloc.m index 3b16aa3fea..c326eab300 100644 --- a/test/Analysis/MissingDealloc.m +++ b/test/Analysis/MissingDealloc.m @@ -63,3 +63,23 @@ IBOutlet NSWindow *window; @implementation HasOutlet // no-warning @end +//===------------------------------------------------------------------------=== +// +// 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 -- 2.50.1