[analyzer] Ivar invalidation: identify properties declared in protocols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166211 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/objc_invalidation.m b/test/Analysis/objc_invalidation.m
index 17b74e9..357c5e8 100644
--- a/test/Analysis/objc_invalidation.m
+++ b/test/Analysis/objc_invalidation.m
@@ -63,6 +63,7 @@
SomeInvalidationImplementingObject *_Prop3; // property, invalidate via sending a message to a getter method
SomeInvalidationImplementingObject *_Prop4; // property with @synthesize, invalidate via property
SomeInvalidationImplementingObject *_Prop5; // property with @synthesize, invalidate via getter method
+ SomeInvalidationImplementingObject *_Prop8;
// No warnings on these as they are not invalidatable.
NSObject *NIvar1;
@@ -106,6 +107,7 @@
@synthesize Prop3 = _Prop3;
@synthesize Prop5 = _Prop5;
@synthesize Prop4 = _Prop4;
+@synthesize Prop8 = _Prop8;
- (void) setProp1: (SomeInvalidationImplementingObject*) InObj {
@@ -133,6 +135,7 @@
[self setProp3:0];
[[self Prop5] invalidate2];
[self.Prop4 invalidate];
+ [self.Prop8 invalidate];
self.Prop6 = 0;
[[self Prop7] invalidate];
@@ -143,9 +146,8 @@
// expected-warning@-1 {{Instance variable Ivar1 needs to be invalidated}}
// expected-warning@-2 {{Instance variable MultipleProtocols needs to be invalidated}}
// expected-warning@-3 {{Instance variable MultInheritance needs to be invalidated}}
- // expected-warning@-4 {{Property SynthIvarProp needs to be invalidated}}
+ // expected-warning@-4 {{Property SynthIvarProp needs to be invalidated or set to nil}}
// 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