[clang-tools-extra] 7048cb5 - [clangd] IndexedFiles should include Fils from RefSlab and RelationSlab.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 17 06:44:28 PST 2021
Author: Haojian Wu
Date: 2021-02-17T15:41:09+01:00
New Revision: 7048cb5371f93788ee650c521995a85211f3ae46
URL: https://github.com/llvm/llvm-project/commit/7048cb5371f93788ee650c521995a85211f3ae46
DIFF: https://github.com/llvm/llvm-project/commit/7048cb5371f93788ee650c521995a85211f3ae46.diff
LOG: [clangd] IndexedFiles should include Fils from RefSlab and RelationSlab.
This looks like an oversight.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D96845
Added:
Modified:
clang-tools-extra/clangd/index/FileIndex.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp
index f497f845b42d..528630f9232a 100644
--- a/clang-tools-extra/clangd/index/FileIndex.cpp
+++ b/clang-tools-extra/clangd/index/FileIndex.cpp
@@ -280,11 +280,14 @@ FileSymbols::buildIndex(IndexType Type, DuplicateHandling DuplicateHandle,
}
for (const auto &FileAndRefs : RefsSnapshot) {
RefSlabs.push_back(FileAndRefs.second.Slab);
+ Files.insert(FileAndRefs.first());
if (FileAndRefs.second.CountReferences)
MainFileRefs.push_back(RefSlabs.back().get());
}
- for (const auto &FileAndRelations : RelationsSnapshot)
+ for (const auto &FileAndRelations : RelationsSnapshot) {
+ Files.insert(FileAndRelations.first());
RelationSlabs.push_back(FileAndRelations.second);
+ }
if (Version)
*Version = this->Version;
More information about the cfe-commits
mailing list