This revision was automatically updated to reflect the committed changes.
Closed by commit rL283891: [OpenCL] Allow partial initializer for array and
struct (authored by yaxunl).
Changed prior to commit:
https://reviews.llvm.org/D25335?vs=73818&id=74266#toc
Repository:
rL LLVM
https://revie
yaxunl added inline comments.
Comment at: test/CodeGenOpenCL/partial_initializer.cl:5
+
+// CHECK: @GA = addrspace(1) global [6 x [6 x float]] {{[[][[]}}6 x float]
[float 1.00e+00, float 2.00e+00, float 0.00e+00, float
0.00e+00, float 0.00e+00, float 0.0
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: test/CodeGenOpenCL/partial_initializer.cl:5
+
+// CHECK: @GA = addrspace(1) global [6 x [6 x float]] {{[[][[]}}6 x float]
[float 1.00e+00, float
yaxunl created this revision.
yaxunl added reviewers: Anastasia, bader.
yaxunl added a subscriber: cfe-commits.
Currently Clang allows partial initializer for C99 but not for OpenCL, e.g.
float a[16][16] = {1.0f, 2.0f};
is allowed in C99 but not allowed in OpenCL.
This patch fixes that.
https