This revision was automatically updated to reflect the committed changes.
Closed by commit rL337540: Sema: Fix explicit address space cast in C++
(authored by yaxunl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D49294?vs=156403&id=1
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Thanks, looks good.
https://reviews.llvm.org/D49294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
yaxunl updated this revision to Diff 156403.
yaxunl marked 5 inline comments as done.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D49294
Files:
lib/Sema/SemaCast.cpp
lib/Sema/SemaOverload.cpp
test/CodeGenCXX/address-space-cast.cpp
Index: test/CodeGenCXX/
rjmccall added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:3150
+ !getLangOpts().OpenCLCPlusPlus)
+return false;
+
yaxunl wrote:
> rjmccall wrote:
> > yaxunl wrote:
> > > rjmccall wrote:
> > > > It's not really OpenCL C++ that's special here,
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:3150
+ !getLangOpts().OpenCLCPlusPlus)
+return false;
+
rjmccall wrote:
> yaxunl wrote:
> > rjmccall wrote:
> > > It's not really OpenCL C++ that
rjmccall added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:3150
+ !getLangOpts().OpenCLCPlusPlus)
+return false;
+
yaxunl wrote:
> rjmccall wrote:
> > It's not really OpenCL C++ that's special here, it's the possibility of
> > promotions betw
yaxunl added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:3150
+ !getLangOpts().OpenCLCPlusPlus)
+return false;
+
rjmccall wrote:
> It's not really OpenCL C++ that's special here, it's the possibility of
> promotions between address spaces.
Fo
rjmccall added inline comments.
Comment at: lib/Sema/SemaCast.cpp:2171
+ ->getPointeeType()
+ .getAddressSpace()) {
+Kind = CK_AddressSpaceConversion;
Please extract t
yaxunl created this revision.
yaxunl added a reviewer: rjmccall.
Currently clang does not allow implicit cast of a pointer to a pointer type in
different address space but allows C-style cast of a pointer to a pointer type
in different address space. However, there is a bug in Sema causing incor