[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaOpenCL / unsupported.cl
blob75175c88fe2673027d86401bd51d63b29ab725d7
1 // RUN: %clang_cc1 -verify %s
2 // RUN: %clang_cc1 -verify %s -DBITFIELDS_EXT -triple spir
4 #ifdef BITFIELDS_EXT
5 #pragma OPENCL EXTENSION __cl_clang_bitfields : enable
6 #endif
8 struct test {
9 int a : 1;
10 #ifndef BITFIELDS_EXT
11 // expected-error@-2 {{bit-fields are not supported in OpenCL}}
12 #endif
15 void no_vla(int n) {
16 int a[n]; // expected-error {{variable length arrays are not supported in OpenCL}}
19 void no_logxor(int n) {
20 int logxor = n ^^ n; // expected-error {{^^ is a reserved operator in OpenCL}}