diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 913c5c3219a5c..c25195cd338f9 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -1606,7 +1606,7 @@ void ClangdLSPServer::onBackgroundIndexProgress( 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 index 2ae60910639e1..f0d46ab8a0105 100644 --- a/clang-tools-extra/clangd/Protocol.h +++ b/clang-tools-extra/clangd/Protocol.h @@ -631,7 +631,7 @@ struct WorkDoneProgressReport { /// /// 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 &); //