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