This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf088af37e6b5: [clangd] Fix data type of WorkDoneProgressReport::percentage (authored by ckandeler, committed by kadircet).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101616/new/ https://reviews.llvm.org/D101616 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extra/clangd/Protocol.h Index: clang-tools-extra/clangd/Protocol.h =================================================================== --- clang-tools-extra/clangd/Protocol.h +++ 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<double> percentage; + llvm::Optional<unsigned> percentage; }; llvm::json::Value toJSON(const WorkDoneProgressReport &); // Index: clang-tools-extra/clangd/ClangdLSPServer.cpp =================================================================== --- clang-tools-extra/clangd/ClangdLSPServer.cpp +++ 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,
Index: clang-tools-extra/clangd/Protocol.h =================================================================== --- clang-tools-extra/clangd/Protocol.h +++ 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<double> percentage; + llvm::Optional<unsigned> percentage; }; llvm::json::Value toJSON(const WorkDoneProgressReport &); // Index: clang-tools-extra/clangd/ClangdLSPServer.cpp =================================================================== --- clang-tools-extra/clangd/ClangdLSPServer.cpp +++ 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,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits