150
|
1 // RUN: %clang_cc1 -triple arm64-apple-ios11 -fapplication-extension -Wdeprecated-implementations -verify -Wno-objc-root-class %s
|
|
2 // RUN: %clang_cc1 -triple arm64-apple-tvos11 -fapplication-extension -Wdeprecated-implementations -verify -Wno-objc-root-class %s
|
|
3 // Declarations marked as 'unavailable' in an app extension should not generate a
|
|
4 // warning on implementation.
|
|
5
|
|
6 @interface Parent
|
|
7 - (void)ok __attribute__((availability(ios_app_extension,unavailable,message="not available")));
|
|
8 - (void)reallyUnavail __attribute__((availability(ios,unavailable))); // expected-note {{method 'reallyUnavail' declared here}}
|
|
9 - (void)reallyUnavail2 __attribute__((unavailable)); // expected-note {{method 'reallyUnavail2' declared here}}
|
|
10 @end
|
|
11
|
|
12 @interface Child : Parent
|
|
13 @end
|
|
14
|
|
15 @implementation Child
|
|
16
|
|
17 - (void)ok { // no warning.
|
|
18 }
|
|
19 - (void)reallyUnavail { // expected-warning {{implementing unavailable method}}
|
|
20 }
|
|
21 - (void)reallyUnavail2 { // expected-warning {{implementing unavailable method}}
|
|
22 }
|
|
23
|
|
24 @end
|