1 // RUN: %clang_cc1 -triple=x86_64-apple-macos10.10 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s
6 - (void) D __attribute__((deprecated)); // expected-note {{method 'D' declared here}}
8 - (void) unavailable __attribute__((__unavailable__)); // expected-note {{method 'unavailable' declared here}}
12 + (void)F __attribute__((deprecated));
16 - (void) E __attribute__((deprecated));
20 + (void)F { } // No warning, implementing its own deprecated method
21 - (void) D {} // expected-warning {{implementing deprecated method}}
22 - (void) E {} // No warning, implementing deprecated method in its class extension.
24 - (void) unavailable { } // expected-warning {{implementing unavailable metho}}
28 - (void) G __attribute__((deprecated));
31 @implementation A(CAT)
32 - (void) G {} // No warning, implementing its own deprecated method
35 __attribute__((deprecated)) // expected-note {{'CL' has been explicitly marked deprecated here}}
36 @interface CL // expected-note 2 {{class declared here}}
39 @implementation CL // expected-warning {{implementing deprecated class}}
42 @implementation CL (SomeCategory) // expected-warning {{implementing deprecated category}}
45 @interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}
49 - (void) B __attribute__((deprecated)); // expected-note {{method 'B' declared here}}
51 + (void) unavailable __attribute__((availability(macos, unavailable))); // expected-note {{method 'unavailable' declared here}}
58 - (void) B {} // expected-warning {{implementing deprecated method}}
59 + (void) unavailable { } // expected-warning {{implementing unavailable method}}
66 - (id)initSpecialInPrivateHeader __attribute__((deprecated));
70 - (id)initSpecialInPrivateHeader {
75 __attribute__((deprecated))
76 @interface Test(DeprecatedCategory) // expected-note {{category declared here}}
79 @implementation Test(DeprecatedCategory) // expected-warning {{implementing deprecated category}}