rjmccall added inline comments.
================ Comment at: lib/Sema/SemaCast.cpp:2283 + const QualType &SrcType, + const QualType &DestType) { + // OpenCL v1 s6.5: Casting a pointer to address space A to a pointer to ---------------- Why is this not a method on `CastOperation`? ================ Comment at: lib/Sema/SemaCast.cpp:2288 + SrcType->isPointerType()) { + const PointerType *DestPtr = DestType->getAs<PointerType>(); + if (!DestPtr->isAddressSpaceOverlapping(*SrcType->getAs<PointerType>())) { ---------------- Please test the result of `getAs` instead of separately testing `isPointerType`. Why is this check OpenCL-specific? Address spaces are a general language feature. https://reviews.llvm.org/D52598 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits