diff options
| author | Anastasia Stulova <anastasia.stulova@arm.com> | 2016-03-03 18:38:40 +0000 |
|---|---|---|
| committer | Anastasia Stulova <anastasia.stulova@arm.com> | 2016-03-03 18:38:40 +0000 |
| commit | 782d5f43ca4e22e0cc36d8a3f4cd1ba45650b32b (patch) | |
| tree | a7b458a3043e0e05c19e814e82d01be693da6190 /clang/test/Parser/opencl-storage-class.cl | |
| parent | 3928910fe6b120f296854edd4c160d521de5efe2 (diff) | |
| download | bcm5719-llvm-782d5f43ca4e22e0cc36d8a3f4cd1ba45650b32b.tar.gz bcm5719-llvm-782d5f43ca4e22e0cc36d8a3f4cd1ba45650b32b.zip | |
[OpenCL] Improve diagnostics of address spaces for variables in function
- Prevent local variables to be declared in global AS
- Diagnose AS of local variables with an extern storage class
as if they would be in a program scope
Review: http://reviews.llvm.org/D17345
llvm-svn: 262641
Diffstat (limited to 'clang/test/Parser/opencl-storage-class.cl')
| -rw-r--r-- | clang/test/Parser/opencl-storage-class.cl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Parser/opencl-storage-class.cl b/clang/test/Parser/opencl-storage-class.cl index 3d9aef59f0b..34cba693f04 100644 --- a/clang/test/Parser/opencl-storage-class.cl +++ b/clang/test/Parser/opencl-storage-class.cl @@ -8,8 +8,8 @@ void test_storage_class_specs() auto int d; // expected-error {{OpenCL does not support the 'auto' storage class specifier}} #pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable - static int e; // expected-error {{program scope variable must reside in constant address space}} + static int e; // expected-error {{static local variable must reside in constant address space}} register int f; - extern int g; + extern int g; // expected-error {{extern variable must reside in constant address space}} auto int h; } |

