1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-do compile } */
4 /* Test deprecate attribute with normal @protocol declarations. */
10 __attribute__ ((deprecated))
11 @protocol DeprecatedProtocol1
15 @protocol NonDeprecatedProtocol1
16 - (void) anotherMethod;
19 @protocol Protocol2 <DeprecatedProtocol1> /* { dg-warning "is deprecated" } */
20 - (void) someOtherMethod;
23 @protocol Protocol3 <NonDeprecatedProtocol1>
24 - (void) someOtherMethod2;
27 @protocol Protocol4 <NonDeprecatedProtocol1, DeprecatedProtocol1> /* { dg-warning "is deprecated" } */
28 - (void) someOtherMethod3;
32 @interface Class1 <DeprecatedProtocol1> /* { dg-warning "is deprecated" } */
35 @interface Class2 <NonDeprecatedProtocol1>
38 @interface Class3 <NonDeprecatedProtocol1, DeprecatedProtocol1> /* { dg-warning "is deprecated" } */
41 @interface Class2 (Category1) <DeprecatedProtocol1> /* { dg-warning "is deprecated" } */
44 void function1 (id <DeprecatedProtocol1> object); /* { dg-warning "is deprecated" } */
45 void function2 (id <NonDeprecatedProtocol1> object);
49 void function3 (Class4 <DeprecatedProtocol1> *object); /* { dg-warning "is deprecated" } */
50 void function4 (Class4 <NonDeprecatedProtocol1> *object);
51 void function5 (Class4 <NonDeprecatedProtocol1, DeprecatedProtocol1> *object); /* { dg-warning "is deprecated" } */
55 Protocol *p1 = @protocol (DeprecatedProtocol1); /* { dg-warning "is deprecated" } */
56 Protocol *p2 = @protocol (NonDeprecatedProtocol1);