[PATCH] D50960: [clangd] Add missing lock in the lookup.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 20 02:08:44 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE340156: [clangd] Add missing lock in the lookup. (authored by hokein, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50960?vs=161442&id=161447#toc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50960
Files:
clangd/index/MemIndex.cpp
Index: clangd/index/MemIndex.cpp
===================================================================
--- clangd/index/MemIndex.cpp
+++ clangd/index/MemIndex.cpp
@@ -64,6 +64,7 @@
void MemIndex::lookup(const LookupRequest &Req,
llvm::function_ref<void(const Symbol &)> Callback) const {
+ std::lock_guard<std::mutex> Lock(Mutex);
for (const auto &ID : Req.IDs) {
auto I = Index.find(ID);
if (I != Index.end())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50960.161447.patch
Type: text/x-patch
Size: 449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180820/d8652300/attachment.bin>
More information about the cfe-commits
mailing list