]> granicus.if.org Git - clang/commit
[Sema] Prevent binding incompatible addr space ref to temporaries
authorAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 5 Jun 2019 14:03:34 +0000 (14:03 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 5 Jun 2019 14:03:34 +0000 (14:03 +0000)
commitedd2b980ccba1709058c98de1393c6a3d461c810
tree0158fcb564e83320e087850cb4fe7ad31569137f
parent3d8ffd268a97e51fe8c4da6af059035b5875e103
[Sema] Prevent binding incompatible addr space ref to temporaries

References to arbitrary address spaces can't always be bound to
temporaries. This change extends the reference binding logic to
check that the address space of a temporary can be implicitly
converted to the address space in a reference when temporary
materialization is performed.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362604 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Type.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Initialization.h
lib/Sema/SemaInit.cpp
test/SemaOpenCLCXX/address-space-references.cl [new file with mode: 0644]