| 1 |
// RUN: %clang_cc1 -verify %s |
| 2 |
// RUN: %clang_cc1 -cl-std=CL2.0 -verify %s |
| 3 |
|
| 4 |
kernel int bar() { // expected-error {{kernel must have void return type}} |
| 5 |
return 6; |
| 6 |
} |
| 7 |
|
| 8 |
kernel void main() { // expected-error {{kernel cannot be called 'main'}} |
| 9 |
|
| 10 |
} |
| 11 |
|
| 12 |
int main() { // expected-error {{function cannot be called 'main'}} |
| 13 |
return 0; |
| 14 |
} |
| 15 |
|
| 16 |
int* global x(int* x) { // expected-error {{return type cannot be qualified with address space}} |
| 17 |
return x + 1; |
| 18 |
} |
| 19 |
|
| 20 |
int* local x(int* x) { // expected-error {{return type cannot be qualified with address space}} |
| 21 |
return x + 1; |
| 22 |
} |
| 23 |
|
| 24 |
int* constant x(int* x) { // expected-error {{return type cannot be qualified with address space}} |
| 25 |
return x + 1; |
| 26 |
} |