[OpenCL] Set generic addr space of 'this' in special class members.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 14 Jan 2019 11:44:22 +0000 (11:44 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 14 Jan 2019 11:44:22 +0000 (11:44 +0000)
commitd1986d1b5a671bb73481f595a9d7e130b11f0d55
treead8a9e7a41d37145b421f5c771f64f1a1ec2c1a0
parent560b853ccfa65815c2262d4eaadf54bf96e9ae52
[OpenCL] Set generic addr space of 'this' in special class members.

Set address spaces of 'this' param correctly for implicit special
class members.

This also changes initialization conversion sequence to separate
address space conversion from other qualifiers in case of binding
reference to a temporary. In this case address space conversion
should happen after the binding (unlike for other quals). This is
needed to materialize it correctly in the alloca address space.

Initial patch by Mikael Nilssoni!

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

llvm-svn: 351053
clang/include/clang/Sema/Sema.h
clang/lib/AST/Expr.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaInit.cpp
clang/lib/Sema/SemaType.cpp
clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl
clang/test/SemaOpenCLCXX/address-space-templates.cl