minix/external/bsd/llvm/dist/clang/test/SemaOpenCL/storageclass.cl
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

14 lines
543 B
Common Lisp

// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2
static constant int A = 0;
int X = 0; // expected-error{{global variables must have a constant address space qualifier}}
// static is not allowed at local scope.
void kernel foo() {
static int X = 5; // expected-error{{variables in function scope cannot be declared static}}
auto int Y = 7; // expected-error{{OpenCL does not support the 'auto' storage class specifier}}
}
static void kernel bar() { // expected-error{{kernel functions cannot be declared static}}
}