summaryrefslogtreecommitdiffstats
path: root/test/Parser/opencl-pragma.cl
blob: 4c48b2a496f78ae15faa467cd3b9a046aa9d4d52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 %s -verify -pedantic -Wno-empty-translation-unit -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}}
OpenPOWER on IntegriCloud