diff options
| author | Joey Gouly <joey.gouly@arm.com> | 2013-01-17 17:35:00 +0000 |
|---|---|---|
| committer | Joey Gouly <joey.gouly@arm.com> | 2013-01-17 17:35:00 +0000 |
| commit | 1d58cdbf4e1737438f0cf94a3d6f827c1b03a39f (patch) | |
| tree | a0903c92afa6131fef22c2e2c9ec638a9bc099f2 /clang/test/SemaOpenCL/unsupported.cl | |
| parent | 80a82761bde1fee351c6a7381f439ba8b6213198 (diff) | |
| download | bcm5719-llvm-1d58cdbf4e1737438f0cf94a3d6f827c1b03a39f.tar.gz bcm5719-llvm-1d58cdbf4e1737438f0cf94a3d6f827c1b03a39f.zip | |
Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.
llvm-svn: 172732
Diffstat (limited to 'clang/test/SemaOpenCL/unsupported.cl')
| -rw-r--r-- | clang/test/SemaOpenCL/unsupported.cl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaOpenCL/unsupported.cl b/clang/test/SemaOpenCL/unsupported.cl new file mode 100644 index 00000000000..bb9da4b272d --- /dev/null +++ b/clang/test/SemaOpenCL/unsupported.cl @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -verify %s + +struct { + int a : 1; // expected-error {{bitfields are not supported in OpenCL}} +}; + +void no_vla(int n) { + int a[n]; // expected-error {{variable length arrays are not supported in OpenCL}} +} |

