[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
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

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-16 Thread Anastasia Stulova via Phabricator via cfe-commits
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

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
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.

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
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

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
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

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-12 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
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