Skip to content

Commit d132708

Browse files
committed
Ensure the correct function is called by appending std:: to the std math functions
1 parent a8296e1 commit d132708

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13974,7 +13974,7 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
1397413974
// before matching base types if other side is an optional, so
1397513975
// score needs to account for number of such promotions.
1397613976
int optionalWraps = baseType2.getInt() - baseType1.getInt();
13977-
return recordFix(fix, baseImpact + abs(optionalWraps))
13977+
return recordFix(fix, baseImpact + std::abs(optionalWraps))
1397813978
? SolutionKind::Error
1397913979
: SolutionKind::Solved;
1398013980
};

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ ExpressionTimer::~ExpressionTimer() {
8080

8181
if (PrintDebugTiming) {
8282
// Round up to the nearest 100th of a millisecond.
83-
llvm::errs() << llvm::format("%0.2f", ceil(elapsed * 100000) / 100)
83+
llvm::errs() << llvm::format("%0.2f", std::ceil(elapsed * 100000) / 100)
8484
<< "ms\t";
8585
if (auto *E = Anchor.dyn_cast<Expr *>()) {
8686
E->getLoc().print(llvm::errs(), Context.SourceMgr);

lib/Sema/TypeCheckStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ namespace {
172172

173173
if (ctx.TypeCheckerOpts.DebugTimeFunctionBodies) {
174174
// Round up to the nearest 100th of a millisecond.
175-
llvm::errs() << llvm::format("%0.2f", ceil(elapsed * 100000) / 100) << "ms\t";
175+
llvm::errs() << llvm::format("%0.2f", std::ceil(elapsed * 100000) / 100) << "ms\t";
176176
Function.getLoc().print(llvm::errs(), ctx.SourceMgr);
177177

178178
if (AFD) {

0 commit comments

Comments
 (0)