xref: /aosp_15_r20/external/clang/test/Parser/opencl-unroll-hint.cl (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li//RUN: %clang_cc1 -O0 -cl-std=CL2.0 -fsyntax-only -verify %s
2*67e74705SXin Li
3*67e74705SXin Likernel void B (global int *x) {
4*67e74705SXin Li  __attribute__((opencl_unroll_hint(42)))
5*67e74705SXin Li  if (x[0])                             // expected-error {{OpenCL only supports 'opencl_unroll_hint' attribute on for, while, and do statements}}
6*67e74705SXin Li    x[0] = 15;
7*67e74705SXin Li}
8*67e74705SXin Li
9