[libcxx][test] Fix a test for the range of file offsets on ARMv7 Linux targets. ...
[llvm-project.git] / clang / test / Sema / attr-availability-visionos.c
blob2c388c5d529073b6ff6fdc969d15fc5405e92a92
1 // RUN: %clang_cc1 -triple arm64-apple-xros1 -fapplication-extension -verify=visionos %s 2>&1
3 __attribute__((availability(xros, unavailable))) // visionos-warning {{unknown platform 'xros' in availability macro}}
4 void xros_unavail(); // visionos-note {{}}
6 __attribute__((availability(xros_app_extension, unavailable))) // visionos-warning {{unknown platform 'xros_app_extension' in availability macro}}
7 void xros_ext_unavail(); // visionos-note {{}}
9 __attribute__((availability(visionOSApplicationExtension, unavailable)))
10 void visionos_ext_unavail(); // visionos-note {{}}
12 void use() {
13 xros_unavail(); // visionos-error {{'xros_unavail' is unavailable: not available on visionOS}}
14 xros_ext_unavail(); // visionos-error {{'xros_ext_unavail' is unavailable: not available on visionOS}}
15 visionos_ext_unavail(); // visionos-error {{'visionos_ext_unavail' is unavailable: not available on visionOS}}
18 __attribute__((availability(visionOS, introduced=1.0)))
19 void visionos_introduced_1();
21 __attribute__((availability(visionos, introduced=1.1)))
22 void visionos_introduced_1_1(); // visionos-note 4 {{'visionos_introduced_1_1' has been marked as being introduced in visionOS 1.1 here, but the deployment target is visionOS 1}}
24 void use2() {
25 if (__builtin_available(iOS 16.1, *))
26 visionos_introduced_1_1(); // visionos-warning {{'visionos_introduced_1_1' is only available on visionOS 1.1 or newer}} visionos-note {{enclose}}
28 if (__builtin_available(xrOS 1.1, *)) // visionos-error {{unrecognized platform name xrOS}}
29 visionos_introduced_1_1(); // visionos-warning {{'visionos_introduced_1_1' is only available on visionOS 1.1 or newer}} visionos-note {{enclose}}
31 if (__builtin_available(xros_app_extension 1, *)) // visionos-error {{unrecognized platform name xros_app_extension}}
32 visionos_introduced_1_1(); // visionos-warning {{'visionos_introduced_1_1' is only available on visionOS 1.1 or newer}} visionos-note {{enclose}}
34 if (__builtin_available(visionOS 1.1, *))
35 visionos_introduced_1_1();
37 visionos_introduced_1();
38 visionos_introduced_1_1(); // visionos-warning {{'visionos_introduced_1_1' is only available on visionOS 1.1 or newer}} visionos-note {{enclose}}