Peter Collingbourne | db27d82 | 2011-02-15 19:46:41 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -fsyntax-only |
Peter Collingbourne | e2f82f7 | 2011-02-11 19:59:54 +0000 | [diff] [blame] | 2 | |
| 3 | void test_storage_class_specs() |
| 4 | { |
| 5 | static int a; // expected-error {{OpenCL does not support the 'static' storage class specifier}} |
| 6 | register int b; // expected-error {{OpenCL does not support the 'register' storage class specifier}} |
| 7 | extern int c; // expected-error {{OpenCL does not support the 'extern' storage class specifier}} |
| 8 | auto int d; // expected-error {{OpenCL does not support the 'auto' storage class specifier}} |
Peter Collingbourne | b8b0e75 | 2011-10-06 03:01:00 +0000 | [diff] [blame] | 9 | |
| 10 | #pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable |
| 11 | static int e; |
| 12 | register int f; |
| 13 | extern int g; |
| 14 | auto int h; |
Peter Collingbourne | e2f82f7 | 2011-02-11 19:59:54 +0000 | [diff] [blame] | 15 | } |