kbobyrev updated this revision to Diff 248164. kbobyrev added a comment. %s/ceil/floor/g
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75604/new/ https://reviews.llvm.org/D75604 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp Index: clang-tools-extra/clangd/ClangdLSPServer.cpp =================================================================== --- clang-tools-extra/clangd/ClangdLSPServer.cpp +++ clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -1406,6 +1406,8 @@ WorkDoneProgressReport Report; Report.percentage = 100.0 * (Stats.Completed - Stats.LastIdle) / (Stats.Enqueued - Stats.LastIdle); + // Round down to 2 decimal places for readability. + Report.percentage = std::floor(*Report.percentage * 100.0) / 100.0; Report.message = llvm::formatv("{0}/{1}", Stats.Completed - Stats.LastIdle, Stats.Enqueued - Stats.LastIdle);
Index: clang-tools-extra/clangd/ClangdLSPServer.cpp =================================================================== --- clang-tools-extra/clangd/ClangdLSPServer.cpp +++ clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -1406,6 +1406,8 @@ WorkDoneProgressReport Report; Report.percentage = 100.0 * (Stats.Completed - Stats.LastIdle) / (Stats.Enqueued - Stats.LastIdle); + // Round down to 2 decimal places for readability. + Report.percentage = std::floor(*Report.percentage * 100.0) / 100.0; Report.message = llvm::formatv("{0}/{1}", Stats.Completed - Stats.LastIdle, Stats.Enqueued - Stats.LastIdle);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits