[PATCH] D92201: [clangd] Make sure project-aware index is up-to-date for estimateMemoryUsage()
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 26 18:32:23 PST 2020
kbobyrev created this revision.
kbobyrev added a reviewer: sammccall.
Herald added subscribers: cfe-commits, usaxena95, arphaman.
Herald added a project: clang.
kbobyrev requested review of this revision.
Herald added subscribers: MaskRay, ilya-biryukov.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92201
Files:
clang-tools-extra/clangd/index/ProjectAware.cpp
Index: clang-tools-extra/clangd/index/ProjectAware.cpp
===================================================================
--- clang-tools-extra/clangd/index/ProjectAware.cpp
+++ clang-tools-extra/clangd/index/ProjectAware.cpp
@@ -71,6 +71,8 @@
};
size_t ProjectAwareIndex::estimateMemoryUsage() const {
+ // Ensure IndexForSpec is up-to-date.
+ getIndex(); // Unused.
size_t Total = 0;
std::lock_guard<std::mutex> Lock(Mu);
for (auto &Entry : IndexForSpec)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92201.307945.patch
Type: text/x-patch
Size: 473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201127/e5a4910d/attachment.bin>
More information about the cfe-commits
mailing list