[PATCH] D118935: [SYCL] Disallow explicit casts between mismatching address spaces

Harald van Dijk via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 15:43:24 PDT 2022


hvdijk added a comment.

In D118935#3399095 <https://reviews.llvm.org/D118935#3399095>, @Fznamznon wrote:

> I was under impression that the change is small and therefore easy to understand. Would some comment like "SYCL re-uses OpenCL mode diagnostics to emit errors in case the cast happens between disjoint address spaces" help?

Speaking only for myself, but it was clear to me that that's what it did. What wasn't clear to me was why that's okay, and that was because I was under the impression that there were ways around this in OpenCL that are unavailable in SYCL. What might have helped me was a comment not saying that the cast is also an error is OpenCL mode, but that there is no way at all to express the conversion in OpenCL mode. This is all in hindsight though, I am not sure to what extent my confusion was foreseeable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118935



More information about the cfe-commits mailing list