Home | History | Annotate | Download | only in SemaOpenCL
      1 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2
      2 
      3 static constant int A = 0;
      4 
      5 int X = 0; // expected-error{{global variables must have a constant address space qualifier}}
      6 
      7 // static is not allowed at local scope.
      8 void kernel foo() {
      9   static int X = 5; // expected-error{{variables in function scope cannot be declared static}} 
     10   auto int Y = 7; // expected-error{{OpenCL does not support the 'auto' storage class specifier}}
     11 }
     12 
     13 static void kernel bar() { // expected-error{{kernel functions cannot be declared static}}
     14 }
     15