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

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 20 02:56:32 PST 2019


Anastasia added inline comments.


================
Comment at: lib/Sema/SemaExpr.cpp:7795
+        if (lhq.getAddressSpace() != rhq.getAddressSpace())
+          return Sema::IncompatibleNestedPointerDiscardsQualifiers;
+
----------------
I am wondering since the behavior is so specialized for the address spaces whether we should name this something like `IncompatibleNestedPointerAddressSpaceMismatch`.


================
Comment at: test/SemaOpenCL/address-spaces.cl:87
+
+  // FIXME: This doesn't seem right. This should be an error, not a warning.
+  __local int * __global * __private * lll;
----------------
Are we sure it has to be an error? May be we can change this wording to something like - unknown behavior that needs clarifying? Some similar text to your comment in the code.


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

https://reviews.llvm.org/D58236





More information about the cfe-commits mailing list