Fznamznon added a comment. > I misread what was done with addrspace_cast, that new operator only allows > conversions that are otherwise also allowed. Based on that, this change does > actually align with what was done for OpenCL mode, it does not restrict > anything that is allowed in OpenCL mode. It does make sense, then. A slightly > more verbose commit message might have helped though :)
Right, the intention of this change is to re-use OpenCL mode logic. There is no connection between addrspace_cast operator and this change. In fact, there is no such operator in SYCL. > Even better, some comments in the code explaining the "why" would have helped. 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? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118935/new/ https://reviews.llvm.org/D118935 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits