summaryrefslogtreecommitdiff
path: root/test/Parser/opencl-unroll-hint.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/opencl-unroll-hint.cl')
-rw-r--r--test/Parser/opencl-unroll-hint.cl8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/opencl-unroll-hint.cl b/test/Parser/opencl-unroll-hint.cl
new file mode 100644
index 000000000000..5742dcde2195
--- /dev/null
+++ b/test/Parser/opencl-unroll-hint.cl
@@ -0,0 +1,8 @@
+//RUN: %clang_cc1 -O0 -cl-std=CL2.0 -fsyntax-only -verify %s
+
+kernel void B (global int *x) {
+ __attribute__((opencl_unroll_hint(42)))
+ if (x[0]) // expected-error {{OpenCL only supports 'opencl_unroll_hint' attribute on for, while, and do statements}}
+ x[0] = 15;
+}
+