aboutsummaryrefslogtreecommitdiff
path: root/test/SemaOpenCL
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-09-19 21:14:35 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-09-19 21:14:35 +0000
commit8c25fc584ce27d59df9923f153e8a132dde58d04 (patch)
tree340d3d5522a86b684a28fdd90801c0e74c302264 /test/SemaOpenCL
parenta68c4aff8cd3aada697ad36dc6582d0e09b4b0d2 (diff)
OpenCL: introduce support for function scope __local variables
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r--test/SemaOpenCL/local.cl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaOpenCL/local.cl b/test/SemaOpenCL/local.cl
new file mode 100644
index 0000000000..8637cfff30
--- /dev/null
+++ b/test/SemaOpenCL/local.cl
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
+
+__kernel void foo(void) {
+ __local int i;
+ __local int j = 2; // expected-error {{'__local' variable cannot have an initializer}}
+}