[PATCH] D20948: [OpenCL] Fix access qualifiers handling for typedefs

Andrew Savonichev via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 08:33:40 PDT 2016


asavonic added inline comments.

================
Comment at: test/SemaOpenCL/images-typedef.cl:40
@@ +39,3 @@
+  myWrite(img); // expected-error {{passing 'img1d_ro_default' (aka '__read_only image1d_t') to parameter of incompatible type '__write_only image1d_t'}}
+}
+
----------------
No, but write_only qualifer was just silently ignored and img had a read_only type.

I changed the diagnostic, it should be better now:

  typedef write_only image1d_t img1d_wo; // note: previously declared 'write_only' here
  kernel void k7(read_only img1d_wo img){} // error: multiple access qualifiers

================
Comment at: test/SemaOpenCL/images-typedef.cl:43
@@ +42,3 @@
+kernel void k6(img1d_ro img) {
+  myRead(img);
+}
----------------
In this case we should rename merged test to just 'access-qualifier.cl', since images-typedef.cl contains positive test cases too. Is it ok?


http://reviews.llvm.org/D20948





More information about the cfe-commits mailing list