brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · f759cf1 Raw
27 lines · plain
1// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only2// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.03 4#if __OPENCL_C_VERSION__ == CL_VERSION_2_05// expected-no-diagnostics6#endif7 8__generic int * __generic_test(__generic int *arg) {9  __generic int *var;10  return var;  11}12#if __OPENCL_C_VERSION__ != CL_VERSION_2_013// 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#endif17 18generic int * generic_test(generic int *arg) {19  generic int *var;20  return var;  21}22#if __OPENCL_C_VERSION__ != CL_VERSION_2_023// 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#endif27