[OpenCL] Fix reinterpret_cast of vectors
authorOle Strohm <olemarius.strohm@arm.com>
Mon, 17 May 2021 11:02:54 +0000 (12:02 +0100)
committerOle Strohm <olemarius.strohm@arm.com>
Mon, 17 May 2021 11:42:21 +0000 (12:42 +0100)
commit66b112d624a549489fa0af131cf7b632c6181424
treea366dfc9532c02fcccbab8cb0fad8484e8709bc1
parent511f4ae54ed498981723f597d94cbf41f60b8d78
[OpenCL] Fix reinterpret_cast of vectors

Fixes issues with vectors in reinterpret_cast in C++ for OpenCL
and adds tests to make sure they both pass without errors and
generate the correct code.

Fixes: PR47977

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D101519
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCast.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/CodeGenOpenCLCXX/reinterpret_cast.clcpp [new file with mode: 0644]
clang/test/SemaOpenCLCXX/reinterpret-cast.clcpp [new file with mode: 0644]