Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Parser / opencl-cl20.cl
blobf759cf1dfaf7aa56c2691470a7722158e49075c3
1 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
2 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0
4 #if __OPENCL_C_VERSION__ == CL_VERSION_2_0
5 // expected-no-diagnostics
6 #endif
8 __generic int * __generic_test(__generic int *arg) {
9 __generic int *var;
10 return var;
12 #if __OPENCL_C_VERSION__ != CL_VERSION_2_0
13 // expected-error@-5 {{OpenCL C version 1.2 does not support the '__generic' type qualifier}}
14 // expected-error@-6 {{OpenCL C version 1.2 does not support the '__generic' type qualifier}}
15 // expected-error@-6 {{OpenCL C version 1.2 does not support the '__generic' type qualifier}}
16 #endif
18 generic int * generic_test(generic int *arg) {
19 generic int *var;
20 return var;
22 #if __OPENCL_C_VERSION__ != CL_VERSION_2_0
23 // expected-error@-5 {{OpenCL C version 1.2 does not support the 'generic' type qualifier}}
24 // expected-error@-6 {{OpenCL C version 1.2 does not support the 'generic' type qualifier}}
25 // expected-error@-6 {{OpenCL C version 1.2 does not support the 'generic' type qualifier}}
26 #endif