1 // RUN: %clang_cc1 -triple=x86_64-apple-macos10.10 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s
4 - (void) D __attribute__((deprecated)); // expected-note {{method 'D' declared here}}
6 - (void) unavailable __attribute__((__unavailable__)); // expected-note {{method 'unavailable' declared here}}
10 + (void)F __attribute__((deprecated));
14 - (void) E __attribute__((deprecated));
18 + (void)F { } // No warning, implementing its own deprecated method
19 - (void) D {} // expected-warning {{implementing deprecated method}}
20 - (void) E {} // No warning, implementing deprecated method in its class extension.
22 - (void) unavailable { } // expected-warning {{implementing unavailable metho}}
26 - (void) G __attribute__((deprecated));
29 @implementation A(CAT)
30 - (void) G {} // No warning, implementing its own deprecated method
33 __attribute__((deprecated)) // expected-note {{'CL' has been explicitly marked deprecated here}}
34 @interface CL // expected-note 2 {{class declared here}}
37 @implementation CL // expected-warning {{implementing deprecated class}}
40 @implementation CL (SomeCategory) // expected-warning {{implementing deprecated category}}
43 @interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}
47 - (void) B __attribute__((deprecated)); // expected-note {{method 'B' declared here}}
49 + (void) unavailable __attribute__((availability(macos, unavailable))); // expected-note {{method 'unavailable' declared here}}
56 - (void) B {} // expected-warning {{implementing deprecated method}}
57 + (void) unavailable { } // expected-warning {{implementing unavailable method}}
64 - (id)initSpecialInPrivateHeader __attribute__((deprecated));
68 - (id)initSpecialInPrivateHeader {
73 __attribute__((deprecated))
74 @interface Test(DeprecatedCategory) // expected-note {{category declared here}}
77 @implementation Test(DeprecatedCategory) // expected-warning {{implementing deprecated category}}