]> granicus.if.org Git - clang/commit
[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)
commit5c85c8c7fb3f03288d288b51c2fcf5fdc4647aaa
tree91b02ed9fe397d8a2b12df4b14aa6dc2ede8a6ae
parent765aed95548bbd215d97f8418f43815823e79905
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351053 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/AST/Expr.cpp
lib/CodeGen/CGCall.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaType.cpp
test/CodeGenOpenCLCXX/addrspace-of-this.cl
test/SemaOpenCLCXX/address-space-templates.cl