[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 22:55:37 PDT 2019
rjmccall added inline comments.
================
Comment at: cfe/trunk/lib/Sema/SemaExprCXX.cpp:4229
+ LangAS AddrSpaceR =
+ RHSType->getAs<BlockPointerType>()->getPointeeType().getAddressSpace();
+ CastKind Kind =
----------------
All of this can be much simpler:
```
LangAS AddrSpaceL = ToType->castAs<BlockPointerType>()->getPointeeType().getAddressSpace();
LangAS AddrSpaceR = FromType->castAs<BlockPointerType>()->getPointeeType().getAddressSpace();
```
Is there something actually checking the validity of this address-space cast somewhere?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64083/new/
https://reviews.llvm.org/D64083
More information about the cfe-commits
mailing list