[clangd] Add missing lock in the lookup.
Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D50960 llvm-svn: 340156
This commit is contained in:
parent
30ffdf42f7
commit
02465baea2
|
@ -64,6 +64,7 @@ bool MemIndex::fuzzyFind(
|
|||
|
||||
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())
|
||||
|
|
Loading…
Reference in New Issue