[PATCH] D79302: [clangd] Propogate context in LSPServer tests
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 3 04:47:03 PDT 2020
sammccall added a comment.
Hmm, I wonder if we should have a Context.bind(function) -> function.
I guess it runs into the usual thing of not being able to deduce a functor's signature, so you get an ugly templated return type..
================
Comment at: clang-tools-extra/clangd/unittests/LSPClient.cpp:120
+ auto Req = std::move(Requests.front());
+ // Leave request on the queue so that waiters can see it.
Lock.unlock();
----------------
which waiters? isn't it just this thread?
================
Comment at: clang-tools-extra/clangd/unittests/LSPClient.cpp:122
Lock.unlock();
- Action(H);
+ WithContext Ctx(std::move(Req.Ctx));
+ Req.Action(H);
----------------
nit: scope WithContext to exclude taking the lock?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79302/new/
https://reviews.llvm.org/D79302
More information about the cfe-commits
mailing list