[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 29 20:47:11 PST 2021


rjmccall added inline comments.


================
Comment at: clang/lib/Sema/SemaInit.cpp:4297
+          ? S.Context.getQualifiedType(T1, T1Quals.withoutAddressSpace())
+          : cv1T1;
   // Not reference-related. Create a temporary and bind to that.
----------------
Should we be rejecting this path immediately if the address space in T1 can't be converted to from the address space of temporaries?


================
Comment at: clang/lib/Sema/SemaInit.cpp:4308
+      if (T1Quals.hasAddressSpace())
+        Sequence.AddQualificationConversionStep(cv1T1, VK_XValue);
+    } else
----------------
This should only be `VK_XValue` if we're binding a r-value reference, I think.


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

https://reviews.llvm.org/D95608



More information about the cfe-commits mailing list