diff options
| author | Tanya Lattner <tonic@nondot.org> | 2013-04-05 20:14:50 +0000 |
|---|---|---|
| committer | Tanya Lattner <tonic@nondot.org> | 2013-04-05 20:14:50 +0000 |
| commit | 713eef4f7ca2bb26a1a1d39713ac167a397b65b3 (patch) | |
| tree | f9ff613110e298d0e35f617b655d8babec6504c3 /clang/test/SemaOpenCL/storageclass.cl | |
| parent | b8055cbc9dde9d1386d85f1e6f0876cef1646c87 (diff) | |
| download | bcm5719-llvm-713eef4f7ca2bb26a1a1d39713ac167a397b65b3.tar.gz bcm5719-llvm-713eef4f7ca2bb26a1a1d39713ac167a397b65b3.zip | |
Add an error to check that all program scope variables are in the constant address space in OpenCL.
llvm-svn: 178906
Diffstat (limited to 'clang/test/SemaOpenCL/storageclass.cl')
| -rw-r--r-- | clang/test/SemaOpenCL/storageclass.cl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/SemaOpenCL/storageclass.cl b/clang/test/SemaOpenCL/storageclass.cl index fdfe1346218..d2678f2010d 100644 --- a/clang/test/SemaOpenCL/storageclass.cl +++ b/clang/test/SemaOpenCL/storageclass.cl @@ -2,6 +2,8 @@ static constant int A = 0; +int X = 0; // expected-error{{global variables must have a constant address space qualifier}} + // static is not allowed at local scope. void kernel foo() { static int X = 5; // expected-error{{variables in function scope cannot be declared static}} |

