[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 9 03:08:51 PST 2025
================
@@ -14585,11 +14585,18 @@ void Sema::CheckAddressOfPackedMember(Expr *rhs) {
_2, _3, _4));
}
+static ExprResult UsualUnaryConversionsNoPromoteInt(Sema &S, Expr *E) {
+ // Don't promote integer types
+ if (QualType Ty = E->getType(); S.getASTContext().isPromotableIntegerType(Ty))
+ return S.DefaultFunctionArrayLvalueConversion(E);
+ return S.UsualUnaryConversions(E);
----------------
frasercrmck wrote:
I don't have strong opinions either way. I've added some CodeGen tests for bitfields so at least the current behaviour is tested.
https://github.com/llvm/llvm-project/pull/119423
More information about the cfe-commits
mailing list