[PATCH] D106410: [PowerPC] Emit error for Altivec vector initializations when -faltivec-src-compat=gcc is specified
Nemanja Ivanovic via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 30 06:04:59 PDT 2021
nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.
Other than the naming nit, this LGTM.
================
Comment at: clang/include/clang/Sema/Sema.h:6103
+ // these vectors on gcc (an error is emitted).
+ bool IsAltivecCompatGCC(SourceRange R, QualType VecTy, QualType SrcTy);
+
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106410/new/
https://reviews.llvm.org/D106410
More information about the cfe-commits
mailing list