Ted Kremenek | e0bb804 | 2008-12-08 21:59:21 +0000 | [diff] [blame^] | 1 | // RUN: clang -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s --verify |
| 2 | typedef signed char BOOL; |
| 3 | @protocol NSObject - (BOOL)isEqual:(id)object; @end |
| 4 | @interface NSObject <NSObject> {} |
| 5 | - (void)dealloc; |
| 6 | @end |
| 7 | |
| 8 | // <rdar://problem/6380411>: 'myproperty' has kind 'assign' and thus the |
| 9 | // assignment through the setter does not perform a release. |
| 10 | |
| 11 | @interface MyObject : NSObject { |
| 12 | id _myproperty; |
| 13 | } |
| 14 | @property(assign) id myproperty; |
| 15 | @end |
| 16 | |
| 17 | @implementation MyObject |
| 18 | @synthesize myproperty=_myproperty; // no-warning |
| 19 | - (void)dealloc { |
| 20 | self.myproperty = 0; |
| 21 | [super dealloc]; |
| 22 | } |
| 23 | @end |