[OpenCL] Fixed address space cast in C style cast of C++ parsing
authorAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 10 Oct 2018 16:05:22 +0000 (16:05 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 10 Oct 2018 16:05:22 +0000 (16:05 +0000)
commit5325f83470d518b5fd650bdafcbdb4370006006d
tree5ad8c81957a8d723cf9b2d1dec69d3a2ddd52226
parenta6a201916adcf9ab3376cc288ade4670aa6dff61
[OpenCL] Fixed address space cast in C style cast of C++ parsing

C style cast in OpenCL C++ was ignoring the address space
conversions from OpenCL C and as a result accepting incorrect
code to compile. This commit adds special function for checking
correctness of address spaces that is shared between C and C++
casts.

llvm-svn: 344148
clang/lib/Sema/SemaCast.cpp
clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl
clang/test/SemaOpenCL/address-spaces.cl