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.
Details
Details
- Reviewers
nemanjai stefanp - Group Reviewers
Restricted Project - Commits
- rG5ea6117a9e9e: [PowerPC] Emit error for Altivec vector initializations when -faltivec-src…
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Other than the naming nit, this LGTM.
clang/include/clang/Sema/Sema.h | ||
---|---|---|
6107 | I think a more appropriate name here would be something like |
Comment Actions
Addressed Nemanja's comment on the commit.
https://reviews.llvm.org/rG5ea6117a9e9eae49ad1295fa422266ef3832e419
I think a more appropriate name here would be something like
CheckAltivecInitFromScalar()
Since this checks whether initialization of an Altivec vector type from a scalar is allowed. The fact that it is not allowed only if we have the GCC source compat option specified isn't really the important aspect to the caller - the caller only cares if it is OK to allow an initialization of an Altivec vector from a scalar.