1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 __attribute ((unavailable))
4 @protocol FwProto; // expected-note{{marked unavailable}}
6 Class <FwProto> cFw = 0; // expected-error {{'FwProto' is unavailable}}
9 __attribute ((deprecated)) @protocol MyProto1 // expected-note 7 {{'MyProto1' has been explicitly marked deprecated here}}
12 @protocol Proto2 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
17 @interface MyClass1 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
23 @interface Derived : MyClass1 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
25 id <MyProto1> ivar; // expected-warning {{'MyProto1' is deprecated}}
29 @interface MyClass1 (Category) <MyProto1, Proto2> // expected-warning {{'MyProto1' is deprecated}}
34 Class <MyProto1> clsP1 = 0; // expected-warning {{'MyProto1' is deprecated}}
36 @protocol FwProto @end // expected-note{{marked unavailable}}
38 @interface MyClass2 <FwProto> // expected-error {{'FwProto' is unavailable}}
41 __attribute ((unavailable)) __attribute ((deprecated)) @protocol XProto; // expected-note{{marked unavailable}}
43 id <XProto> idX = 0; // expected-error {{'XProto' is unavailable}}
47 MyClass1 <MyProto1> *p1; // expected-warning {{'MyProto1' is deprecated}}