[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 5 07:50:29 PST 2018


Anastasia added inline comments.


================
Comment at: lib/Sema/SemaOverload.cpp:1146
+    unsigned OldQuals = OldMethod->getTypeQualifiers().getCVRUQualifiers();
+    unsigned NewQuals = NewMethod->getTypeQualifiers().getCVRUQualifiers();
     if (!getLangOpts().CPlusPlus14 && NewMethod->isConstexpr() &&
----------------
mikael wrote:
> rjmccall wrote:
> > This is an algorithm that I think you need to get right and which shouldn't drop address spaces.
> But with this patch we can only have __generic address space for methods. So if I try to implement something here I can't really test it? Or am I missing something?
Since we didn't add address spaces to the method qualifiers yet, it seems logical to ignore them.

Although we could already say, since we would like to add such overloading anyway, it would be logical to return true for the address space qualifiers mismatch just like it's done for CV quals in line 1154. However, I can't think of any way we could test this indeed.


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

https://reviews.llvm.org/D54862





More information about the cfe-commits mailing list