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