This revision was automatically updated to reflect the committed changes.
Closed by commit rL316016: [OpenCL] Restrict swizzle length check to OpenCL
mode (authored by bruno).
Changed prior to commit:
https://reviews.llvm.org/D38868?vs=118966&id=119351#toc
Repository:
rL LLVM
https://review
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: test/SemaOpenCL/vector_swizzle_length.cl:7
void foo() {
-float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0);
+float8 f2 = (float8){0, 0, 0, 0, 0, 0
bruno updated this revision to Diff 118966.
bruno marked 2 inline comments as done.
bruno added a comment.
Update patch after Anastasia's suggestions
https://reviews.llvm.org/D38868
Files:
lib/Sema/SemaExprMember.cpp
test/Sema/vector_swizzle_length.c
test/SemaOpenCL/vector_swizzle_length.
bruno marked 2 inline comments as done.
bruno added inline comments.
Comment at: test/SemaOpenCL/vector_swizzle_length.cl:7
void foo() {
-float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0);
+float8 f2 = (float8){0, 0, 0, 0, 0, 0, 0, 0};
Anastasia wrote:
> Ev
Anastasia added inline comments.
Comment at: test/SemaOpenCL/vector_swizzle_length.cl:7
void foo() {
-float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0);
+float8 f2 = (float8){0, 0, 0, 0, 0, 0, 0, 0};
Even though this works in Clang, ideally OpenCL vector li
bruno created this revision.
Herald added a subscriber: yaxunl.
Change behavior introduced in r298369 and only error out on vector component
invalid length access on OpenCL mode.
https://reviews.llvm.org/D38868
Files:
lib/Sema/SemaExprMember.cpp
test/SemaOpenCL/vector_swizzle_length.cl
I