[PATCH] D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 12:13:50 PDT 2019


Anastasia created this revision.
Anastasia added reviewers: rjmccall, bader.
Herald added subscribers: jdoerfert, ebevhan, yaxunl.

Not sure it's the right approach but the idea is that we would like to accept vector contraction syntax from OpenCL C.

This commit fixes Sema checks when creating a vector using compound vector syntax. We should pass the type of initializing expression consistently, to avoid mismatch with the initializer.

This change also improves testing for the vector creation.


https://reviews.llvm.org/D59426

Files:
  lib/Sema/SemaInit.cpp
  test/CodeGenOpenCL/vector_literals_valid.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59426.190865.patch
Type: text/x-patch
Size: 5850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190315/db09400b/attachment.bin>


More information about the cfe-commits mailing list