[PATCH] D71272: [OpenCL] Pretty print __private addr space
Alexey Sotkin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 13 00:16:06 PST 2019
AlexeySotkin 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'}}
}
----------------
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.
================
Comment at: clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl:373
#if !__OPENCL_CPP_VERSION__
-// expected-error at -3{{passing '__constant int *' to parameter of type '__generic int *' changes address space of pointer}}
+// expected-error at -3{{passing '__constant int *__private' to parameter of type '__generic int *' changes address space of pointer}}
#else
----------------
Again, I think it would be more clear if it was: `passing '__constant int *__private' to parameter of type '__generic int *__private' changes address space of pointer`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71272/new/
https://reviews.llvm.org/D71272
More information about the cfe-commits
mailing list