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

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 30 04:06:11 PDT 2021


Anastasia 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, "")
 
----------------
azabaznov wrote:
> 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.
Improving testing is always desirable. I have added testing for all image types that are implemented in clang now.

>  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.

Technically I am moving it elsewhere so it is no longer needed here. :)


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

https://reviews.llvm.org/D100983



More information about the cfe-commits mailing list