Home | History | Annotate | Download | only in SemaOpenCL
      1 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0
      2 
      3 void test1(pipe int *p) {// expected-error {{pipes packet types cannot be of reference type}}
      4 }
      5 void test2(pipe p) {// expected-error {{missing actual type specifier for pipe}}
      6 }
      7 void test3(int pipe p) {// expected-error {{cannot combine with previous 'int' declaration specifier}}
      8 }
      9 void test4() {
     10   pipe int p; // expected-error {{type 'pipe int' can only be used as a function parameter}}
     11   //TODO: fix parsing of this pipe int (*p);
     12 }
     13 
     14 void test5(pipe int p) {
     15   p+p; // expected-error{{invalid operands to binary expression ('pipe int' and 'pipe int')}}
     16   p=p; // expected-error{{invalid operands to binary expression ('pipe int' and 'pipe int')}}
     17   &p; // expected-error{{invalid argument type 'pipe int' to unary expression}}
     18   *p; // expected-error{{invalid argument type 'pipe int' to unary expression}}
     19 }
     20 
     21 typedef pipe int pipe_int_t;
     22 pipe_int_t test6() {} // expected-error{{declaring function return value of type 'pipe_int_t' (aka 'pipe int') is not allowed}}
     23