HomePhabricator

[PR41276] Fixed incorrect generation of addr space cast for 'this' in C++.

Authored by Anastasia on Apr 4 2019, 3:48 AM.

Description

[PR41276] Fixed incorrect generation of addr space cast for 'this' in C++.

Improved classification of address space cast when qualification
conversion is performed - prevent adding addr space cast for
non-pointer and non-reference types. Take address space correctly
from the pointee.

Also pass correct address space from 'this' object using
AggValueSlot when generating addrspacecast in the constructor
call.

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

llvm-svn: 357682