Tanya Lattner | 5e94d6f | 2012-06-19 23:09:52 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2 |
| 2 | |
Joey Gouly | 68bb7a6 | 2013-01-24 15:24:54 +0000 | [diff] [blame] | 3 | static constant int A = 0; |
Tanya Lattner | 5e94d6f | 2012-06-19 23:09:52 +0000 | [diff] [blame] | 4 | |
| 5 | // static is not allowed at local scope. |
| 6 | void kernel foo() { |
| 7 | static int X = 5; // expected-error{{variables in function scope cannot be declared static}} |
| 8 | auto int Y = 7; // expected-error{{OpenCL does not support the 'auto' storage class specifier}} |
| 9 | } |
| 10 | |
| 11 | static void kernel bar() { // expected-error{{kernel functions cannot be declared static}} |
| 12 | } |