[PATCH] D65387: [clangd] Add a callback mechanism for handling responses from client.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 10:09:52 PDT 2019


ilya-biryukov added a comment.

Could you add a bit more context to the description of the change: why do we need the callback and what is the problem with what we have now?
I'm sure this was discussed offline and the change is justified, just wanted to make sure we write it down in the change history.



================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:334
+  // No callback for the client reply, just log them.
+  if (!CB) {
+    if (Result)
----------------
NIT: simplify to
```
if (CB)
  return CB(std::move(Result));
// rest of the code.
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65387





More information about the cfe-commits mailing list