[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 25 03:00:02 PDT 2020


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:96
+    } Counter(Request->DebugString());
+    return std::forward<IndexCall>(Call)(
+        *Index, ClangdRequest, [&](const StreamType &Item) {
----------------
sammccall wrote:
> I don't think you need forward here... just take the param by const reference?
How do I do that? The problem is that some functions return `bool` and one `void`, so I can't really assign the result to variable and then return it.


================
Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:49
+    llvm::cl::desc("Pretty-print JSON output"),
+    llvm::cl::init(true),
+};
----------------
sammccall wrote:
> kadircet wrote:
> > this sounds like a debug feature, do we really want it to be true by default?
> This option is not worth having at all, IMO.
Why not? It's relatively hard to read trace files otherwise. Do you think they should be pretty-printed by default?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84499





More information about the cfe-commits mailing list