ioeric added inline comments.

================
Comment at: clangd/JSONRPCDispatcher.cpp:221
+        Out.log("<-- " + JSONRef + "\n");
+        handleAllErrors(Doc.takeError(), [&](const llvm::ErrorInfoBase &Err) {
+          Out.log(llvm::Twine("JSON parse error: ") + Err.message() + "\n");
----------------
Use `llvm::toString`?


================
Comment at: clangd/JSONRPCDispatcher.h:47
+  // Whether output should be pretty-printed.
+  const bool Pretty;
+
----------------
It seems that we are piggybacking a state of clangd with `JSONOutput`. It might 
make sense to store the option in clangd (or the dispatcher?) and pass it via 
`writeMessage`, but what you have is also fine if it saves trouble :)


https://reviews.llvm.org/D40406



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

Reply via email to