[PATCH] D33201: [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 16 06:27:31 PDT 2017


krasimir accepted this revision.
krasimir added a comment.
This revision is now accepted and ready to land.

Looks good!



================
Comment at: clangd/ClangdLSPServer.h:33
+  /// each instance of ClangdLSPServer.
+  void run(std::istream &In);
 
----------------
ilya-biryukov wrote:
> krasimir wrote:
> > It seems strange to have the In here and the Out in the constructor.
> Didn't want to store unnecessary fields in the class, but we do need JSONOutput &Out as a member, since there's consumeDiagnostics which uses it.
> Would you prefer std::istream &In to be moved into a constructor parameter and stored as a field?
I get it now. It's OK as it is now!


https://reviews.llvm.org/D33201





More information about the cfe-commits mailing list