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

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 1 21:52:33 PDT 2018

yaxunl added inline comments.

Comment at: lib/Sema/SemaCast.cpp:1050
+         SrcType->getAs<PointerType>()->getPointeeType().getAddressSpace() !=
+             DestType->getAs<PointerType>()->getPointeeType().getAddressSpace();
rjmccall wrote:
> I know the code was like this before, but please rewrite this to just use `getAs<PointerType>()` instead of doing the separate `isPointerType()` check.
IsAddressSpaceConversion is also called in line 2218 of the same file, where SrcType or DestType may not be pointer type.


More information about the cfe-commits mailing list