Page MenuHomePhabricator

[PR41010][OpenCL] Allow OpenCL C style vector initialization in C++
AbandonedPublic

Authored by Anastasia on Mar 15 2019, 12:12 PM.

Details

Summary

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.

Diff Detail

Event Timeline

Anastasia created this revision.Mar 15 2019, 12:12 PM
rjmccall added inline comments.
lib/Sema/SemaInit.cpp
1295

There should at least be a comment here explaining this, but mostly it's been so long since I've really understood this code that I'd like Richard to look at it.

kpet added a subscriber: kpet.Apr 30 2019, 4:52 AM

@rsmith, do you have any comments here? It would be quite useful to have this patch in Clang9.

Anastasia abandoned this revision.Thu, Jul 25, 9:03 AM

Created a follow up review in https://reviews.llvm.org/D65286