blob: 658c72c69f17e969ee359c219f9e7e53d4434447 [file] [log] [blame]
Fariborz Jahanianbc1c8772008-12-17 01:07:27 +00001// RUN: clang -fsyntax-only -verify %s
2
3__attribute ((unavailable))
4@protocol FwProto;
5
6Class <FwProto> cFw = 0; // expected-warning {{'FwProto' is unavailable}}
7
8
9__attribute ((deprecated)) @protocol MyProto1
10@end
11
12@protocol Proto2 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
13+method2;
14@end
15
16
17@interface MyClass1 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
18{
19 Class isa;
20}
21@end
22
23@interface Derived : MyClass1 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
24{
25 id <MyProto1> ivar; // expected-warning {{'MyProto1' is deprecated}}
26}
27@end
28
29@interface MyClass1 (Category) <MyProto1, Proto2> // expected-warning {{'MyProto1' is deprecated}}
30@end
31
32
33
34Class <MyProto1> clsP1 = 0; // expected-warning {{'MyProto1' is deprecated}}
35
36@protocol FwProto @end
37
38@interface MyClass2 <FwProto> // expected-warning {{'FwProto' is unavailable}}
39@end
40
41__attribute ((unavailable)) __attribute ((deprecated)) @protocol XProto;
42
43id <XProto> idX = 0; // expected-warning {{'XProto' is unavailable}} expected-warning {{'XProto' is deprecated}}
44
45int main ()
46{
47 MyClass1 <MyProto1> *p1; // expected-warning {{'MyProto1' is deprecated}}
48}
49