kbobyrev abandoned this revision.
kbobyrev marked an inline comment as done.
kbobyrev 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;
----------------
sammccall wrote:
> 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?
Okay, makes sense. I saw this in coc.nvim and I can just fix it there, but I 
thought it might also happen in other editors. I also thought we do not care 
too much about precision here, but I'm OK with fixing it on the editor side.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75604/new/

https://reviews.llvm.org/D75604



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to