// Collect all ivars that need cleanup.
IvarSet Ivars;
const ObjCInterfaceDecl *InterfaceD = D->getClassInterface();
- for (ObjCInterfaceDecl::ivar_iterator
- II = InterfaceD->ivar_begin(),
- IE = InterfaceD->ivar_end(); II != IE; ++II) {
- const ObjCIvarDecl *Iv = *II;
+
+ // Collect ivars declared in this class, its extensions and its implementation
+ ObjCInterfaceDecl *IDecl = const_cast<ObjCInterfaceDecl *>(InterfaceD);
+ for (const ObjCIvarDecl *Iv = IDecl->all_declared_ivar_begin(); Iv;
+ Iv= Iv->getNextIvar())
trackIvar(Iv, Ivars);
- }
// Construct Property/Property Accessor to Ivar maps to assist checking if an
// ivar which is backing a property has been reset.
@end
-@implementation SomeSubclassInvalidatableObject
+@interface SomeSubclassInvalidatableObject()
+@property (assign) SomeInvalidationImplementingObject* Prop8;
+@end
+
+@implementation SomeSubclassInvalidatableObject{
+ @private
+ SomeInvalidationImplementingObject *Ivar5;
+}
@synthesize Prop7 = _propIvar;
@synthesize Prop3 = _Prop3;
// expected-warning@-4 {{Property SynthIvarProp needs to be invalidated}}
// expected-warning@-5 {{Instance variable _Ivar3 needs to be invalidated}}
// expected-warning@-6 {{Instance variable _Ivar4 needs to be invalidated}}
+ // expected-warning@-7 {{Instance variable Ivar5 needs to be invalidated or set to nil}}
+ // expected-warning@-8 {{Property Prop8 needs to be invalidated}}
@end