[PATCH] D77671: [clangd] Destroy context before resetting CurrentReq
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 12:32:14 PDT 2020
kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov.
Herald added a project: clang.
Our tests stash callbacks into request context and rely on it being
invoked before threads going idle.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77671
Files:
clang-tools-extra/clangd/TUScheduler.cpp
Index: clang-tools-extra/clangd/TUScheduler.cpp
===================================================================
--- clang-tools-extra/clangd/TUScheduler.cpp
+++ clang-tools-extra/clangd/TUScheduler.cpp
@@ -255,9 +255,11 @@
NextReq.reset();
}
- WithContext Guard(std::move(CurrentReq->Ctx));
- // Build the preamble and let the waiters know about it.
- build(std::move(*CurrentReq));
+ {
+ WithContext Guard(std::move(CurrentReq->Ctx));
+ // Build the preamble and let the waiters know about it.
+ build(std::move(*CurrentReq));
+ }
bool IsEmpty = false;
{
std::lock_guard<std::mutex> Lock(Mutex);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77671.255767.patch
Type: text/x-patch
Size: 688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200407/31db9085/attachment.bin>
More information about the cfe-commits
mailing list