Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaOpenCL / invalid-kernel.cl
blob723baa08603ed187f599e1ed83b13a0dff9c9ece
1 // RUN: %clang_cc1 -verify %s
2 // RUN: %clang_cc1 -cl-std=CL2.0 -verify %s
4 kernel int bar() { // expected-error {{kernel must have void return type}}
5 return 6;
8 kernel void main() { // expected-error {{kernel cannot be called 'main'}}
12 int main() { // expected-error {{function cannot be called 'main'}}
13 return 0;
16 int* global x(int* x) { // expected-error {{return type cannot be qualified with address space}}
17 return x + 1;
20 int* local x(int* x) { // expected-error {{return type cannot be qualified with address space}}
21 return x + 1;
24 int* constant x(int* x) { // expected-error {{return type cannot be qualified with address space}}
25 return x + 1;