[clangd] Ensure that we reply to each call exactly once. NFC (I think!)
authorSam McCall <sam.mccall@gmail.com>
Wed, 24 Oct 2018 14:26:26 +0000 (14:26 +0000)
committerSam McCall <sam.mccall@gmail.com>
Wed, 24 Oct 2018 14:26:26 +0000 (14:26 +0000)
commite2f3a7348da6d0aa6d59e7bf820acdc3bf136cfd
tree2883be3551b1a1ce515918eda6830f3084c57d18
parent6d26ed92cc557ea68bb51647e92f56ea91cb2334
[clangd] Ensure that we reply to each call exactly once. NFC (I think!)

Summary:
In debug builds, getting this wrong will trigger asserts.
In production builds, it will send an error reply if none was sent,
and drop redundant replies. (And log).

No tests because this is always a programming error.
(We did have some cases of this, but I fixed them with the new dispatcher).

Reviewers: ioeric

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits

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

llvm-svn: 345144
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/Trace.h