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

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 1 15:06:13 PDT 2018


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<PointerType>()->getPointeeType().getAddressSpace() !=
+             DestType->getAs<PointerType>()->getPointeeType().getAddressSpace();
+}
----------------
I know the code was like this before, but please rewrite this to just use `getAs<PointerType>()` instead of doing the separate `isPointerType()` check.


https://reviews.llvm.org/D50003





More information about the cfe-commits mailing list