[PATCH] D58236: Make address space conversions a bit stricter.

Bevin Hansson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 18 05:31:09 PST 2019


ebevhan marked 6 inline comments as done.
ebevhan added inline comments.


================
Comment at: lib/Sema/SemaCast.cpp:2295
+  // FIXME: C++ might want to emit different errors here.
   if (Self.getLangOpts().OpenCL) {
+    const Type *DestPtr, *SrcPtr;
----------------
I'd also like to petition to remove the guard on OpenCL here. Maybe an RFC for formalizing the support for address space conversion semantics is in order?


================
Comment at: lib/Sema/SemaExpr.cpp:14206
+        // XXX: Should this be a different variation of the error, like
+        // 'changes address space in nested pointer qualifiers'?
+        DiagKind = diag::err_typecheck_incompatible_address_space;
----------------
rjmccall wrote:
> Yeah, I think that would be more straightforward.
I ended up not making it that different from the original one. Perhaps it's not different enough?


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

https://reviews.llvm.org/D58236





More information about the cfe-commits mailing list