comparison clang/test/Frontend/stdlang.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // RUN: %clang_cc1 -x cuda -std=c++11 -DCUDA %s
2 // RUN: %clang_cc1 -x cl -DOPENCL %s
3 // RUN: %clang_cc1 -x cl -cl-std=cl -DOPENCL %s
4 // RUN: %clang_cc1 -x cl -cl-std=cl1.1 -DOPENCL %s
5 // RUN: %clang_cc1 -x cl -cl-std=cl1.2 -DOPENCL %s
6 // RUN: %clang_cc1 -x cl -cl-std=cl2.0 -DOPENCL %s
7 // RUN: %clang_cc1 -x cl -cl-std=clc++ -DOPENCL %s
8 // RUN: %clang_cc1 -x cl -cl-std=CL -DOPENCL %s
9 // RUN: %clang_cc1 -x cl -cl-std=CL1.1 -DOPENCL %s
10 // RUN: %clang_cc1 -x cl -cl-std=CL1.2 -DOPENCL %s
11 // RUN: %clang_cc1 -x cl -cl-std=CL2.0 -DOPENCL %s
12 // RUN: %clang_cc1 -x cl -cl-std=CLC++ -DOPENCL %s
13 // RUN: not %clang_cc1 -x cl -std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s
14 // RUN: not %clang_cc1 -x cl -cl-std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s
15 // CHECK-C99: error: invalid argument '-std=c99' not allowed with 'OpenCL'
16 // CHECK-INVALID: error: invalid value 'invalid' in '-cl-std=invalid'
17
18 #if defined(CUDA)
19 __attribute__((device)) void f_device();
20 #elif defined(OPENCL)
21 kernel void func(void);
22 #endif