[PATCH] D100983: [OpenCL] Fix optional image types

Anton Zabaznov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 28 03:05:56 PDT 2021


azabaznov added inline comments.


================
Comment at: clang/include/clang/Basic/OpenCLImageTypes.def:68
 IMAGE_WRITE_TYPE(image2d_array_msaa_depth, OCLImage2dArrayMSAADepth, "cl_khr_gl_msaa_sharing")
-IMAGE_WRITE_TYPE(image3d, OCLImage3d, "cl_khr_3d_image_writes")
+IMAGE_WRITE_TYPE(image3d, OCLImage3d, "")
 
----------------
Anastasia wrote:
> azabaznov wrote:
> > Maybe we should add a test to check that` image3d_t`  is reserved?
> Do you mean something like:
> 
> ```typedef int image3d_t;```
> 
> And then check that this gives an error?
Yes, exactly. But currently there is already an expected behaviour: https://godbolt.org/z/4afjf5brn. I don't think that your patch changes that, but still, it's good to add a test since you are removing `cl_khr_3d_image_writes` from image descriptions.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100983/new/

https://reviews.llvm.org/D100983



More information about the cfe-commits mailing list