]> granicus.if.org Git - clang/commit
[OpenCL] Diagnose write_only image3d when extension is disabled
authorAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 25 Jan 2017 12:18:50 +0000 (12:18 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 25 Jan 2017 12:18:50 +0000 (12:18 +0000)
commitc98aa2fc0af844a2329e0a486b3f6e6150d4a2fc
tree96f5329e4c3a3a48492d601b2c26807b65ad5bea
parent2c44f4663c11135e794a30316dee7328979baf5d
[OpenCL] Diagnose write_only image3d when extension is disabled

Prior to OpenCL 2.0, image3d_t can only be used with the write_only
access qualifier when the cl_khr_3d_image_writes extension is enabled,
see e.g. OpenCL 1.1 s6.8b.

Require the extension for write_only image3d_t types and guard uses of
write_only image3d_t in the OpenCL header.

Patch by Sven van Haastregt!

Review: https://reviews.llvm.org/D28860

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293050 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/OpenCLImageTypes.def
lib/Headers/opencl-c.h
test/Headers/opencl-c-header.cl
test/SemaOpenCL/access-qualifier.cl