[PowerPC] Emit error for Altivec vector initializations when -faltivec-src-compat...
authorAmy Kwan <amy.kwan1@ibm.com>
Fri, 30 Jul 2021 13:50:44 +0000 (08:50 -0500)
committerAmy Kwan <amy.kwan1@ibm.com>
Fri, 30 Jul 2021 14:35:43 +0000 (09:35 -0500)
commit5ea6117a9e9eae49ad1295fa422266ef3832e419
treebee8b950a9b35ab481e33b5fbafb465cc1e2c594
parent14c1450d5cac71d0bfa946a4766a3cd125e6a694
[PowerPC] Emit error for Altivec vector initializations when -faltivec-src-compat=gcc is specified

Under the -faltivec-src-compat=gcc option, AltiVec vector initialization should
be treated as if they were compiled with gcc - which is, to emit an error when
the vectors are initialized in the parenthesized or non-parenthesized manner.
This patch implements this behaviour.

Differential Revision: https://reviews.llvm.org/D106410
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCast.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/CodeGen/vector-bool-pixel-altivec-init-no-parentheses.c
clang/test/CodeGen/vector-bool-pixel-altivec-init.c