================
@@ -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:

Yes, pretty much. `UsualUnaryConversions` does 
`DefaultFunctionArrayLvalueConversion` first, then floating-point specific 
logic. However, it also handles `isPromotableBitField`s.

In your other comment you ask about enums, and perhaps bitfields also falls 
into that category? Do we really need to support these types in vector 
maths/arithmetic builtins? There are tests for them, so I preserved the 
existing logic (though seemingly not for bitfields) but I see the argument for 
removing that support.

https://github.com/llvm/llvm-project/pull/119423
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to