Skip to content

Commit 70228d0

Browse files
committed
remove BuiltinMaxNumMinNumMath
1 parent f987781 commit 70228d0

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15278,42 +15278,6 @@ bool Sema::PrepareBuiltinElementwiseMathOneArgCall(
1527815278
return false;
1527915279
}
1528015280

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-
1531715281
bool Sema::BuiltinElementwiseMath(CallExpr *TheCall,
1531815282
EltwiseBuiltinArgTyRestriction ArgTyRestr) {
1531915283
if (auto Res = BuiltinVectorMath(TheCall, ArgTyRestr); Res.has_value()) {

0 commit comments

Comments
 (0)