}
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- [_ivar release]; // expected-warning {{use of instance variable '_ivar' after the instance has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of instance variable '_ivar' after the instance has been freed with call to [super dealloc]}}
+ [_ivar release]; // expected-warning {{use of instance variable '_ivar' after 'self' has been deallocated}}
+ // expected-note@-1 {{use of instance variable '_ivar' after 'self' has been deallocated}}
}
@end
}
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- _delegate = nil; // expected-warning {{use of instance variable '_delegate' after the instance has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of instance variable '_delegate' after the instance has been freed with call to [super dealloc]}}
+ _delegate = nil; // expected-warning {{use of instance variable '_delegate' after 'self' has been deallocated}}
+ // expected-note@-1 {{use of instance variable '_delegate' after 'self' has been deallocated}}
}
@end
@implementation SuperDeallocThenAssignIvarField
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- _s.f = 7; // expected-warning {{use of instance variable '_s' after the instance has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of instance variable '_s' after the instance has been freed with call to [super dealloc]}}
+ _s.f = 7; // expected-warning {{use of instance variable '_s' after 'self' has been deallocated}}
+ // expected-note@-1 {{use of instance variable '_s' after 'self' has been deallocated}}
}
@end
@implementation SuperDeallocThenAssignIvarIvar
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- _ivar->_otherIvar = 7; // expected-warning {{use of instance variable '_ivar' after the instance has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of instance variable '_ivar' after the instance has been freed with call to [super dealloc]}}
+ _ivar->_otherIvar = 7; // expected-warning {{use of instance variable '_ivar' after 'self' has been deallocated}}
+ // expected-note@-1 {{use of instance variable '_ivar' after 'self' has been deallocated}}
+}
+@end
+
+@interface SuperDeallocThenAssignSelfIvar : NSObject {
+ NSObject *_ivar;
+}
+@end
+
+@implementation SuperDeallocThenAssignSelfIvar
+- (void)dealloc {
+ [super dealloc]; // expected-note {{[super dealloc] called here}}
+ self->_ivar = nil; // expected-warning {{use of instance variable '_ivar' after 'self' has been deallocated}}
+ // expected-note@-1 {{use of instance variable '_ivar' after 'self' has been deallocated}}
}
@end
}
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- self.ivar = nil; // expected-warning {{use of 'self' after it has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of 'self' after it has been freed with call to [super dealloc]}}
+ self.ivar = nil; // expected-warning {{use of 'self' after it has been deallocated}}
+ // expected-note@-1 {{use of 'self' after it has been deallocated}}
}
@end
}
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- self.delegate = nil; // expected-warning {{use of 'self' after it has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of 'self' after it has been freed with call to [super dealloc]}}
+ self.delegate = nil; // expected-warning {{use of 'self' after it has been deallocated}}
+ // expected-note@-1 {{use of 'self' after it has been deallocated}}
}
@end
}
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- [self _invalidate]; // expected-warning {{use of 'self' after it has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of 'self' after it has been freed with call to [super dealloc]}}
+ [self _invalidate]; // expected-warning {{use of 'self' after it has been deallocated}}
+ // expected-note@-1 {{use of 'self' after it has been deallocated}}
}
@end
@implementation SuperDeallocThenCallNonObjectiveCMethodClass
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- _invalidate(self); // expected-warning {{use of 'self' after it has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of 'self' after it has been freed with call to [super dealloc]}}
+ _invalidate(self); // expected-warning {{use of 'self' after it has been deallocated}}
+ // expected-note@-1 {{use of 'self' after it has been deallocated}}
}
@end
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- [SuperDeallocThenCallObjectiveClassMethodClass invalidate:self]; // expected-warning {{use of 'self' after it has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of 'self' after it has been freed with call to [super dealloc]}}
+ [SuperDeallocThenCallObjectiveClassMethodClass invalidate:self]; // expected-warning {{use of 'self' after it has been deallocated}}
+ // expected-note@-1 {{use of 'self' after it has been deallocated}}
}
@end
return;
}
[super dealloc]; // expected-note {{[super dealloc] called here}}
- [self _invalidate]; // expected-warning {{use of 'self' after it has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of 'self' after it has been freed with call to [super dealloc]}}
+ [self _invalidate]; // expected-warning {{use of 'self' after it has been deallocated}}
+ // expected-note@-1 {{use of 'self' after it has been deallocated}}
}
@end
- (void)dealloc; {
[super dealloc]; // expected-note {{[super dealloc] called here}}
- [self anotherMethod]; // expected-warning {{use of 'self' after it has been freed with call to [super dealloc]}}
- // expected-note@-1 {{use of 'self' after it has been freed with call to [super dealloc]}}
+ [self anotherMethod]; // expected-warning {{use of 'self' after it has been deallocated}}
+ // expected-note@-1 {{use of 'self' after it has been deallocated}}
[super dealloc];
}
@end