[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 1 05:52:18 PST 2021
Anastasia marked an inline comment as done.
Anastasia 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.
----------------
rjmccall wrote:
> Should we be rejecting this path immediately if the address space in T1 can't be converted to from the address space of temporaries?
I agree. I have updated the patch and added more test cases.
================
Comment at: clang/lib/Sema/SemaInit.cpp:4308
+ if (T1Quals.hasAddressSpace())
+ Sequence.AddQualificationConversionStep(cv1T1, VK_XValue);
+ } else
----------------
rjmccall wrote:
> This should only be `VK_XValue` if we're binding a r-value reference, I think.
Yes, I think so too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95608/new/
https://reviews.llvm.org/D95608
More information about the cfe-commits
mailing list