[PATCH] D75604: [clangd] Round WorkDoneProgressBegin.percentage down
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 4 14:38:00 PST 2020
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1409
(Stats.Enqueued - Stats.LastIdle);
+ // Round down to 2 decimal places for readability.
+ Report.percentage = std::floor(*Report.percentage * 100.0) / 100.0;
----------------
Yikes, rounding a float value in the protocol is pretty weird and would deserve more of a comment.
Also this seems like a fairly... improbable bug, in that it's trivial to fix in the editor and would usually be visible if the implementer tried the feature even once.
Which editors specifically are you seeing bad display in? Can we just send them a PR?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75604/new/
https://reviews.llvm.org/D75604
More information about the cfe-commits
mailing list