Fix ICE on reference binding with mismatching addr spaces.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Tue, 5 Feb 2019 11:32:58 +0000 (11:32 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Tue, 5 Feb 2019 11:32:58 +0000 (11:32 +0000)
commite368e4dfd0513fc2b3df4591c61e26a46cab4455
tree61dc46239e1333914373d303e2c1b114ead801db
parent84ca706be1dba3b9a7eb10a3620dfd13f089907e
Fix ICE on reference binding with mismatching addr spaces.

When we attempt to add an addr space qual to a type already
qualified by an addr space ICE is triggered. Before creating
a type with new address space, remove the old addr space.

Fixing PR38614!

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

llvm-svn: 353160
clang/lib/Sema/SemaInit.cpp
clang/test/SemaOpenCLCXX/address-space-of-this.cl [new file with mode: 0644]