[PATCH] D53286: [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 15 05:48:47 PDT 2018


sammccall added a comment.

This patch is big and hard to navigate. I tried to keep it contained, but JSONRPCDispatcher is pretty tangled.

The main parts are:

- `Transport.h` is the key new abstraction that should be understood first
- `JSONTransport.cpp` is its standard implementation. The raw IO stuff in there is just lifted from the old JSONRPCDispatcher, and isn't very interesting. Everything else should be though - it shows how the new interface works.
- The `ClangdLSPServer` and `ClangdMain` changes show how the new interface is used
- `JSONRPCDispatcher` has had most of its guts ripped out. There's more that can be done there, that file may go away completely.
- The test changes just reflect the shutdown getting a little bit stricter (they also pass before this patch)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53286





More information about the cfe-commits mailing list