[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 5 01:21:23 PDT 2018


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clangd/JSONRPCDispatcher.cpp:70
   }
-  log(llvm::Twine("--> ") + S);
+  log(llvm::Twine("--> ") + S + "\n");
 }
----------------
sammccall wrote:
> ilya-biryukov wrote:
> > Log adds a newline for us, right? Why do we want two newlines here?
> Oops, forgot to mention in the description... Yes this is a deliberate double-newline.
> 
> While I was here, I removed the trailing `\n` in most `log()` calls, but decided to *keep* the one after `<--`and *add* one after `-->`, because they help visually separate the big JSON payloads from the rest of the log, which is useful while scanning.
> 
> Happy to remove these special cases, or back out all the unrelated newline changes if you prefer.
It's fine. Just wanted to make sure this wasn't accidental.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47643





More information about the cfe-commits mailing list