[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 29 10:53:50 PDT 2018


rjmccall added a comment.

In https://reviews.llvm.org/D53705#1279068, @svenvh wrote:

> Unlikely, since address spaces are provided in a different way in OpenCL C++ vs OpenCL C.
>
> OpenCL C provides qualifiers such as `global` as part of the language.  OpenCL C++ provides template classes such as `cl::global<T>` through a header file.


So OpenCL C code has to be completely rewritten if it needs to be used as part of an OpenCL C++ program?  And it doesn't really compose like a type if it's supposed to change how a variable is stored.  What a terrible little mess they've made for themselves.

I think a better solution might be to hack the parser to recognize cases like this.  It's more annoying work, but it'll lead to much better results.


Repository:
  rC Clang

https://reviews.llvm.org/D53705





More information about the cfe-commits mailing list