From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Parser/opencl-pragma.cl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 clang/test/Parser/opencl-pragma.cl (limited to 'clang/test/Parser/opencl-pragma.cl') diff --git a/clang/test/Parser/opencl-pragma.cl b/clang/test/Parser/opencl-pragma.cl new file mode 100644 index 0000000..1946077 --- /dev/null +++ b/clang/test/Parser/opencl-pragma.cl @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only + +#pragma OPENCL EXTENSION cl_khr_fp16 : enable + +#pragma OPENCL EXTENSION cl_no_such_extension : disable /* expected-warning {{unknown OpenCL extension 'cl_no_such_extension' - ignoring}} */ + +#pragma OPENCL EXTENSION all : disable +#pragma OPENCL EXTENSION all : enable /* expected-warning {{unknown OpenCL extension 'all' - ignoring}} */ + +#pragma OPENCL EXTENSION cl_khr_fp64 : on /* expected-warning {{expected 'enable' or 'disable' - ignoring}} */ + +#pragma OPENCL FP_CONTRACT ON +#pragma OPENCL FP_CONTRACT OFF +#pragma OPENCL FP_CONTRACT DEFAULT +#pragma OPENCL FP_CONTRACT FOO // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}} -- cgit v1.2.3