[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 04:32:50 PDT 2023


jhuber6 added a comment.

In D58346#4359631 <https://reviews.llvm.org/D58346#4359631>, @ebevhan wrote:

> In D58346#4359291 <https://reviews.llvm.org/D58346#4359291>, @jhuber6 wrote:
>
>> should C++ really be limited by OpenCL here?
>
> It probably shouldn't. There's many places in the codebase where OpenCL flags restrict generic address space behavior. I have a patch at D62574 <https://reviews.llvm.org/D62574> that attempts to formalize the address space rules a bit more (which I think also gets rid of the OpenCL restrictions you mention) but there's never been any huge interest and I don't have the time to push for it.
>
> Whether that patch actually solves your problem or not, I don't know.

A quick scan on where the error gets printed suggests not, since we'd also like the ability to add an address space. My suggestion is to allow `reinterpret_cast` to remove and and add address spaces for C++, OpenCL will remain the same.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58346



More information about the cfe-commits mailing list