[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 02:28:04 PDT 2023
arsenm added a comment.
In D151087#4363503 <https://reviews.llvm.org/D151087#4363503>, @ebevhan wrote:
> In D151087#4362059 <https://reviews.llvm.org/D151087#4362059>, @aaron.ballman wrote:
>
>> Based on all this, I think we should go with `__addrspace_cast` as a named cast and not allow the conversion through `reinterpret_cast` unless going to/from a `[u]intptr_t`.
>
> I think this sounds good. Most of the building blocks for it should already be in place in the form of OpenCL's addrspace_cast.
I think having some kind of addrspacecast operator is unavoidable. reinterpret_cast needs to lower to something like ptrtoint/inttoptr and isn't interchangeable
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151087/new/
https://reviews.llvm.org/D151087
More information about the cfe-commits
mailing list