Skip to content

Commit 657827a

Browse files
committed
remove BuiltinMaxNumMinNumMath
1 parent 10013c7 commit 657827a

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
@@ -15280,42 +15280,6 @@ bool Sema::PrepareBuiltinElementwiseMathOneArgCall(
1528015280
return false;
1528115281
}
1528215282

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

0 commit comments

Comments
 (0)