[PR40778] Preserve addr space in Derived to Base cast.

The address space for the Base class pointer when up-casting
from Derived should be taken from the Derived class pointer.

Differential Revision: https://reviews.llvm.org/D53818



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355606 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed