|
| 1 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=-__opencl_c_images %s |
| 2 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=+__opencl_c_images %s |
| 3 | + |
| 4 | +#ifdef __opencl_c_images |
| 5 | +//expected-no-diagnostics |
| 6 | +#endif |
| 7 | + |
| 8 | +void test1(image1d_t i) {} |
| 9 | +#if !defined(__opencl_c_images) |
| 10 | +// expected-error@-2{{use of type '__read_only image1d_t' requires __opencl_c_images support}} |
| 11 | +#endif |
| 12 | + |
| 13 | +void test2(image2d_t i) {} |
| 14 | +#if !defined(__opencl_c_images) |
| 15 | +// expected-error@-2{{use of type '__read_only image2d_t' requires __opencl_c_images support}} |
| 16 | +#endif |
| 17 | + |
| 18 | +void test3(image1d_array_t i) {} |
| 19 | +#if !defined(__opencl_c_images) |
| 20 | +// expected-error@-2{{use of type '__read_only image1d_array_t' requires __opencl_c_images support}} |
| 21 | +#endif |
| 22 | + |
| 23 | +void test4(image2d_array_t i) {} |
| 24 | +#if !defined(__opencl_c_images) |
| 25 | +// expected-error@-2{{use of type '__read_only image2d_array_t' requires __opencl_c_images support}} |
| 26 | +#endif |
| 27 | + |
| 28 | +void test5(image2d_depth_t i) {} |
| 29 | +#if !defined(__opencl_c_images) |
| 30 | +// expected-error@-2{{use of type '__read_only image2d_depth_t' requires __opencl_c_images support}} |
| 31 | +#endif |
| 32 | + |
| 33 | +void test6(image1d_buffer_t i) {} |
| 34 | +#if !defined(__opencl_c_images) |
| 35 | +// expected-error@-2{{use of type '__read_only image1d_buffer_t' requires __opencl_c_images support}} |
| 36 | +#endif |
| 37 | + |
| 38 | +void test7(image2d_msaa_t i) {} |
| 39 | +#if !defined(__opencl_c_images) |
| 40 | +// expected-error@-2{{use of type '__read_only image2d_msaa_t' requires __opencl_c_images support}} |
| 41 | +#endif |
| 42 | + |
| 43 | +void test8(image2d_array_msaa_t i) {} |
| 44 | +#if !defined(__opencl_c_images) |
| 45 | +// expected-error@-2{{use of type '__read_only image2d_array_msaa_t' requires __opencl_c_images support}} |
| 46 | +#endif |
| 47 | + |
| 48 | +void test9(image2d_msaa_depth_t i) {} |
| 49 | +#if !defined(__opencl_c_images) |
| 50 | +// expected-error@-2{{use of type '__read_only image2d_msaa_depth_t' requires __opencl_c_images support}} |
| 51 | +#endif |
| 52 | + |
| 53 | +void test10(image2d_array_msaa_depth_t i) {} |
| 54 | +#if !defined(__opencl_c_images) |
| 55 | +// expected-error@-2{{use of type '__read_only image2d_array_msaa_depth_t' requires __opencl_c_images support}} |
| 56 | +#endif |
| 57 | + |
| 58 | +void test11(sampler_t s) {} |
| 59 | +#if !defined(__opencl_c_images) |
| 60 | +// expected-error@-2{{use of type 'sampler_t' requires __opencl_c_images support}} |
| 61 | +#endif |
0 commit comments