1*67e74705SXin Li // RUN: %clang_cc1 -x cuda -std=c++11 -DCUDA %s 2*67e74705SXin Li // RUN: %clang_cc1 -x cl -DOPENCL %s 3*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=cl -DOPENCL %s 4*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=cl1.1 -DOPENCL %s 5*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=cl1.2 -DOPENCL %s 6*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=cl2.0 -DOPENCL %s 7*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=CL -DOPENCL %s 8*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=CL1.1 -DOPENCL %s 9*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=CL1.2 -DOPENCL %s 10*67e74705SXin Li // RUN: %clang_cc1 -x cl -cl-std=CL2.0 -DOPENCL %s 11*67e74705SXin Li // RUN: not %clang_cc1 -x cl -std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s 12*67e74705SXin Li // RUN: not %clang_cc1 -x cl -cl-std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s 13*67e74705SXin Li // CHECK-C99: error: invalid argument '-std=c99' not allowed with 'OpenCL' 14*67e74705SXin Li // CHECK-INVALID: error: invalid value 'invalid' in '-cl-std=invalid' 15*67e74705SXin Li 16*67e74705SXin Li #if defined(CUDA) 17*67e74705SXin Li __attribute__((device)) void f_device(); 18*67e74705SXin Li #elif defined(OPENCL) 19*67e74705SXin Li kernel void func(void); 20*67e74705SXin Li #endif 21