From: Pekka Jaaskelainen Date: Thu, 23 Jan 2014 16:36:09 +0000 (+0000) Subject: Allow clang to compile the "extern" storage class in OpenCL 1.2. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d04d7291ea543227cdfb58a843c5c37a80cb222;p=clang Allow clang to compile the "extern" storage class in OpenCL 1.2. The tests (forgot to svn add, sorry!). Patch from Fraser Cormack! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199907 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaOpenCL/extern.cl b/test/SemaOpenCL/extern.cl new file mode 100644 index 0000000000..ee5e07237f --- /dev/null +++ b/test/SemaOpenCL/extern.cl @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -x cl -cl-std=CL1.2 -emit-llvm %s -o - -verify | FileCheck %s +// expected-no-diagnostics + +// CHECK: @foo = external global float +extern constant float foo; + +kernel void test(global float* buf) { + buf[0] += foo; +}