1 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -fsyntax-only -fapplication-extension %s -verify
2 // RUN: %clang_cc1 -triple armv7-apple-ios9.0 -fsyntax-only -fapplication-extension %s -verify
3 // RUN: %clang_cc1 -triple arm64-apple-tvos3.0 -fsyntax-only -fapplication-extension -DTVOS=1 -verify %s
4 // RUN: %clang_cc1 -triple arm64-apple-tvos3.0 -fsyntax-only -fapplication-extension -verify %s
6 #if __has_feature(attribute_availability_app_extension)
7 __attribute__((availability(macosx_app_extension
,unavailable
)))
9 __attribute__((availability(ios_app_extension
,unavailable
)))
11 __attribute__((availability(tvos_app_extension
,unavailable
)))
14 void f0(int); // expected-note {{'f0' has been explicitly marked unavailable here}}
16 __attribute__((availability(macosx
,unavailable
)))
18 __attribute__((availability(ios
,unavailable
)))
20 __attribute__((availability(tvos
,unavailable
)))
22 void f1(int); // expected-note {{'f1' has been explicitly marked unavailable here}}
24 #if __has_feature(attribute_availability_app_extension)
25 __attribute__((availability(macOSApplicationExtension
,unavailable
)))
27 __attribute__((availability(iOSApplicationExtension
,unavailable
)))
29 __attribute__((availability(tvOSApplicationExtension
,unavailable
)))
32 void f2(int); // expected-note {{'f2' has been explicitly marked unavailable here}}
35 f0(1); // expected-error {{'f0' is unavailable: not available on}}
36 f1(1); // expected-error {{'f1' is unavailable}}
37 f2(2); // expected-error {{'f2' is unavailable: not available on}}