diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -1606,7 +1606,7 @@ if (Stats.Completed < Stats.Enqueued) { assert(Stats.Enqueued > Stats.LastIdle); WorkDoneProgressReport Report; - Report.percentage = 100.0 * (Stats.Completed - Stats.LastIdle) / + Report.percentage = 100 * (Stats.Completed - Stats.LastIdle) / (Stats.Enqueued - Stats.LastIdle); Report.message = llvm::formatv("{0}/{1}", Stats.Completed - Stats.LastIdle, diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h --- a/clang-tools-extra/clangd/Protocol.h +++ b/clang-tools-extra/clangd/Protocol.h @@ -631,7 +631,7 @@ /// /// The value should be steadily rising. Clients are free to ignore values /// that are not following this rule. - llvm::Optional percentage; + llvm::Optional percentage; }; llvm::json::Value toJSON(const WorkDoneProgressReport &); //