azabaznov added inline comments.

================
Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:154
   "'%2' %select{type qualifier|storage class specifier}3">;
+def err_opencl_type_specifier_requires : Error<
+  "%select{type qualifier|storage class specifier}0 '%1' requires "
----------------
Anastasia wrote:
> If possible I would prefer to unify the diagnostics. How about something like:
> 
> ```
> '%2' %select{type qualifier|storage class specifier}3 is unsupported in 
> %select{OpenCL C|C++ for OpenCL}0 version %1
> ```
> 
> then where we print the diagnostic we can special case OpenCL 3.0 to also 
> print additionally the feature information. FYI we could add the special case 
> for OpenCL 3.0 later on in a separate patch and for now just reuse the 
> diagnostic as is. Then this patch could still go into release 13 although a 
> bit tight but doable.
This is actually the way how clang provides diagnostic now 
(https://godbolt.org/z/9P6PWdE5M):

```
OpenCL C version 3.0 does not support the 'generic' type qualifier
```
Here I just wanted to unify cases for `pipe` and `generic` since they both 
require OpenCL C 2.0 or later with a feature. Do you think it makes sense?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106748

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

Reply via email to