@@ -15280,42 +15280,6 @@ bool Sema::PrepareBuiltinElementwiseMathOneArgCall(
15280
15280
return false;
15281
15281
}
15282
15282
15283
- bool Sema::BuiltinMaxNumMinNumMath(CallExpr *TheCall) {
15284
- if (checkArgCount(TheCall, 2))
15285
- return true;
15286
-
15287
- ExprResult OrigArg0 = TheCall->getArg(0);
15288
- ExprResult OrigArg1 = TheCall->getArg(1);
15289
-
15290
- // Do standard promotions between the two arguments, returning their common
15291
- // type.
15292
- QualType Res = UsualArithmeticConversions(
15293
- OrigArg0, OrigArg1, TheCall->getExprLoc(), ACK_Comparison);
15294
- if (OrigArg0.isInvalid() || OrigArg1.isInvalid())
15295
- return true;
15296
-
15297
- // Make sure any conversions are pushed back into the call; this is
15298
- // type safe since unordered compare builtins are declared as "_Bool
15299
- // foo(...)".
15300
- TheCall->setArg(0, OrigArg0.get());
15301
- TheCall->setArg(1, OrigArg1.get());
15302
-
15303
- if (!OrigArg0.get()->isTypeDependent() && OrigArg1.get()->isTypeDependent())
15304
- return true;
15305
-
15306
- // If the common type isn't a real floating type, then the arguments were
15307
- // invalid for this operation.
15308
- if (Res.isNull() || !Res->isRealFloatingType())
15309
- return Diag(OrigArg0.get()->getBeginLoc(),
15310
- diag::err_typecheck_call_invalid_ordered_compare)
15311
- << OrigArg0.get()->getType() << OrigArg1.get()->getType()
15312
- << SourceRange(OrigArg0.get()->getBeginLoc(),
15313
- OrigArg1.get()->getEndLoc());
15314
-
15315
- TheCall->setType(Res);
15316
- return false;
15317
- }
15318
-
15319
15283
bool Sema::BuiltinElementwiseMath(CallExpr *TheCall,
15320
15284
EltwiseBuiltinArgTyRestriction ArgTyRestr) {
15321
15285
if (auto Res = BuiltinVectorMath(TheCall, ArgTyRestr); Res.has_value()) {
0 commit comments