[clangd] Simplify code of ClangdLSPServer::onCommand
authorIlya Biryukov <ibiryukov@google.com>
Fri, 16 Aug 2019 12:46:41 +0000 (12:46 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Fri, 16 Aug 2019 12:46:41 +0000 (12:46 +0000)
commit12864001a6520221d91415d68a517d2d478f3659
tree12afc1d17765701f42e73c922dfb19c8af82d2d3
parentb9a8ac74f14d93039509c83059e337f686616cb5
[clangd] Simplify code of ClangdLSPServer::onCommand

Summary:
By inlining a complicated lambda into its single call-site.

Also ensure we call Reply() exactly once even if tweaks return both
ShowMessage and ApplyEdit effects.

Reviewers: hokein

Reviewed By: hokein

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66343

llvm-svn: 369100
clang-tools-extra/clangd/ClangdLSPServer.cpp