[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338805: Sema: Fix explicit address space cast involving void pointers (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D500

[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-08-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaCast.cpp:1050 + SrcType->getAs()->getPointeeType().getAddressSpace() != + DestType->getAs()->getPointeeType().getAddressSpace(); +} yaxunl wrote: > rjmccall wrote: > > yaxunl wrote: > >

[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Sema/SemaCast.cpp:1050 + SrcType->getAs()->getPointeeType().getAddressSpace() != + DestType->getAs()->getPointeeType().getAddressSpace(); +} rjmccall wrote: > yaxunl wrote: > > rjmccall wrote: > >

[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-08-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaCast.cpp:1050 + SrcType->getAs()->getPointeeType().getAddressSpace() != + DestType->getAs()->getPointeeType().getAddressSpace(); +} yaxunl wrote: > rjmccall wrote: > > I know the code w

[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-08-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Sema/SemaCast.cpp:1050 + SrcType->getAs()->getPointeeType().getAddressSpace() != + DestType->getAs()->getPointeeType().getAddressSpace(); +} rjmccall wrote: > I know the code was like this before,

[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-08-01 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. One minor request; feel free to just do that when you commit. Comment at: lib/Sema/SemaCast.cpp:1050 + SrcType->getAs()->getPointeeType().getAddressSpace() != +

[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-07-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: rjmccall. Explicit cast of a void pointer to a pointer type in different address space is incorrectly classified as bitcast, which causes invalid bitcast in codegen. The patch fixes that by checking the address space of the source and destina