[PATCH] D28860: [OpenCL] Diagnose write_only image3d when extension is disabled

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 24 05:40:24 PST 2017


svenvh added a comment.

In https://reviews.llvm.org/D28860#653662, @yaxunl wrote:

> The tests should be added to SemaOpenCL/extension-version.cl


SemaOpenCL/extension-version.cl already has a test for the cl_khr_3d_image_writes extension.



================
Comment at: lib/Sema/SemaType.cpp:6683
+  // access qualifier unless the cl_khr_3d_image_writes extension is enabled.
+  if (CurType->isOCLImage3dWOType() &&
+      !S.getOpenCLOptions().isEnabled("cl_khr_3d_image_writes")) {
----------------
yaxunl wrote:
> should modify OpenCLImageTypes.def for image types associated with an extension. The diagnostics will be emitted automatically.

That's neat, thanks for pointing it out!


https://reviews.llvm.org/D28860





More information about the cfe-commits mailing list