]> granicus.if.org Git - clang/commit
[OpenCL] Allow OpenCL C style vector initialization in C++
authorAnastasia Stulova <anastasia.stulova@arm.com>
Fri, 2 Aug 2019 11:19:35 +0000 (11:19 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Fri, 2 Aug 2019 11:19:35 +0000 (11:19 +0000)
commit91a14f64f769263deea649999cea32ea5bfa14cd
treed56939a4304243bbf7ade00ed65f6751dbd10133
parent0743ec24e3b1a47b0642a280e3499e8b741199ab
[OpenCL] Allow OpenCL C style vector initialization in C++

Allow creating vector literals from other vectors.

 float4 a = (float4)(1.0f, 2.0f, 3.0f, 4.0f);
 float4 v = (float4)(a.s23, a.s01);

Differential revision: https://reviews.llvm.org/D65286

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367675 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaInit.cpp
test/CodeGenOpenCL/vector_literals_nested.cl [deleted file]
test/CodeGenOpenCL/vector_literals_valid.cl
test/SemaCXX/vector.cpp
test/SemaOpenCL/vector_literals_const.cl [deleted file]