[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r355606. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58708/new/ https://reviews.llvm.org/D58708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58708/new/ https://reviews.llvm.org/D58708 ___ cfe-commits mailing list

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:2671 DestType = Context.getPointerType(DestRecordType); FromRecordType = FromType->getPointeeType(); PointerConversions = true; rjm

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 189470. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58708/new/ https://reviews.llvm.org/D58708 Files: lib/CodeGen/CGClass.cpp lib/Sema/SemaExpr.cpp test/CodeGenOpenCLCXX/addrspace-derived-base.cl Index: test/CodeGenOpenCLCXX/addrspace-der

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:2671 DestType = Context.getPointerType(DestRecordType); FromRecordType = FromType->getPointeeType(); PointerConversions = true; And here. CHANGES SINCE LAST ACTION https://

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 189371. Anastasia added a comment. Use common pointer type. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58708/new/ https://reviews.llvm.org/D58708 Files: lib/CodeGen/CGClass.cpp lib/Sema/SemaExpr.cpp test/CodeGenOpenCLCXX/addrspace-derive

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:2666 +? FromType->getPointeeType().getAddressSpace() +: FromType.getAddressSpace()); Please do a `getAs()` into a local and then use that h

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:2670 } else { DestType = DestRecordType; FromRecordType = FromType; rjmccall wrote: > This path (when the object is a gl-value) also needs an address-space > qualifier, so you

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 189347. Anastasia marked an inline comment as done. Anastasia added a comment. Moved adding address space to `DestType` earlier to cover pointer and non-pointer case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58708/new/ https://reviews.llvm.

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:2670 } else { DestType = DestRecordType; FromRecordType = FromType; This path (when the object is a gl-value) also needs an address-space qualifier, so you should probably add i

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-02-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: ebevhan. The address space for the Base class pointer when up-casting from Derived should be taken from the Derived class pointer. https://reviews.llvm.org/D58708 Files: lib/CodeGen/CGClass.cpp