[PATCH] D49294: Sema: Fix explicit address space cast in C++
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 17 15:27:51 PDT 2018
rjmccall added inline comments.
================
Comment at: lib/Sema/SemaCast.cpp:2171
+ ->getPointeeType()
+ .getAddressSpace()) {
+ Kind = CK_AddressSpaceConversion;
----------------
Please extract this to a separate function so you can reuse intermediate results.
And in the presence of address-space promotions, you need to do a promotion followed by a reinterpretation, right?
================
Comment at: lib/Sema/SemaOverload.cpp:3150
+ !getLangOpts().OpenCLCPlusPlus)
+ return false;
+
----------------
It's not really OpenCL C++ that's special here, it's the possibility of promotions between address spaces.
https://reviews.llvm.org/D49294
More information about the cfe-commits
mailing list