rjmccall added inline comments.
================ Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); ---------------- Anastasia wrote: > rjmccall wrote: > > Okay. But if `ToType` *isn't* a reference type, this will never be an > > address-space conversion. I feel like this code could be written more > > clearly to express what it's trying to do. > I hope it makes more sense now. Btw, it also applies to pointer type. The logic is wrong for pointer types; if you're converting pointers, you need to be checking the address space of the pointee type of the from type. It sounds like this is totally inadequately tested; please flesh out the test with all of these cases. While you're at it, please ensure that there are tests verifying that we don't allowing address-space changes in nested positions. https://reviews.llvm.org/D53764 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits