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 | 617bb317a7aeb6c3468a4170a5d6c1058da7cea1 (patch) | |
tree | 64f183c0cf6c88a6d8d8d96feee5101f732c395e /test/SemaOpenCL | |
parent | 5096a44f2ec5ab9e5b801424e04919f4fcf29f1d (diff) |
Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172732 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r-- | test/SemaOpenCL/unsupported.cl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaOpenCL/unsupported.cl b/test/SemaOpenCL/unsupported.cl new file mode 100644 index 0000000000..bb9da4b272 --- /dev/null +++ b/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}} +} |