diff options
Diffstat (limited to 'test/SemaObjC/property-noninherited-availability-attr.m')
-rw-r--r-- | test/SemaObjC/property-noninherited-availability-attr.m | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/SemaObjC/property-noninherited-availability-attr.m b/test/SemaObjC/property-noninherited-availability-attr.m index 79cdd3e..0c2a5d3 100644 --- a/test/SemaObjC/property-noninherited-availability-attr.m +++ b/test/SemaObjC/property-noninherited-availability-attr.m @@ -5,7 +5,8 @@ @interface NSObject @end @protocol myProtocol -@property int myProtocolProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); +@property int myProtocolProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{method 'myProtocolProperty' declared here}} \ + // expected-note {{property 'myProtocolProperty' is declared deprecated here}} @end @interface Foo : NSObject @@ -15,18 +16,19 @@ @end @interface Bar : Foo <myProtocol> -@property int myProperty; // expected-note {{'myProperty' declared here}} -@property int myProtocolProperty; // expected-note {{'myProtocolProperty' declared here}} +@property int myProperty; +@property int myProtocolProperty; @end -void test(Foo *y, Bar *x) { +void test(Foo *y, Bar *x, id<myProtocol> z) { y.myProperty = 0; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}} [y myProperty]; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}} x.myProperty = 1; // no-warning - [x myProperty]; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}} + [x myProperty]; // no-warning x.myProtocolProperty = 0; // no-warning - [x myProtocolProperty]; // expected-warning {{'myProtocolProperty' is deprecated: first deprecated in OS X 10.8}} + [x myProtocolProperty]; // no-warning + [z myProtocolProperty]; // expected-warning {{'myProtocolProperty' is deprecated: first deprecated in OS X 10.8}} } |