Anastasia marked an inline comment as done.
Anastasia added inline comments.


================
Comment at: clang/test/SemaOpenCL/access-qualifier.cl:28
 kernel void k1(img1d_wo img) {
-  myRead(img); // expected-error {{passing 'img1d_wo' (aka '__write_only 
image1d_t') to parameter of incompatible type '__read_only image1d_t'}}
+  myRead(img); // expected-error {{passing '__private img1d_wo' (aka 
'__private __write_only image1d_t') to parameter of incompatible type 
'__read_only image1d_t'}}
 }
----------------
AlexeySotkin wrote:
> Minor. An error message like this looks a bit confusing to me. User might 
> wonder whether parameters are incompatible because of address space or 
> because of access qualifiers. Should it print `passing '__private img1d_wo' 
> (aka '__private __write_only image1d_t')  to parameter of incompatible type 
> '__private __read_only image1d_t'`? In this case it is clear that there is a 
> mismatch in access qualifiers.
Yes, I agree. However, we are printing the full `QualType` in both places in 
this diagnostics, so the problem is that the addr space is either not deduced 
or being dropped from `QualType` somewhere. I don't think we have got addr 
spaces working yet for all cases correctly and printing `__private` have 
revealed a number of such issues. I suggest however to fix them in isolation 
case by case as we discover them. This commit is already pretty big and I don't 
want to expand it even more.  I have opened a bug to track this issues: 
https://bugs.llvm.org/show_bug.cgi?id=44294
Hopefully we can fix it asap. Does it make sense?


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

https://reviews.llvm.org/D71272



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to