From 70674549f10f851b6edf2c5329d1dce56df945c1 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 9 May 2019 14:22:07 +0000 Subject: [clangd] Count number of references while merging RefSlabs inside FileIndex Summary: For counting number of references clangd was relying on merging every duplication of a symbol. Unfortunately this does not apply to FileIndex(and one of its users' BackgroundIndex), since we get rid of duplication by simply dropping symbols coming from non-canonical locations. So only one or two(coming from canonical declaration header and defined source file, if exists) replications of the same symbol reaches merging step. This patch changes reference counting logic to rather count number of different RefSlabs a given SymbolID exists. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59481 llvm-svn: 360344 --- clang-tools-extra/clangd/index/IndexAction.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'clang-tools-extra/clangd/index/IndexAction.cpp') diff --git a/clang-tools-extra/clangd/index/IndexAction.cpp b/clang-tools-extra/clangd/index/IndexAction.cpp index 120f6b0bae5..c4f553bfb61 100644 --- a/clang-tools-extra/clangd/index/IndexAction.cpp +++ b/clang-tools-extra/clangd/index/IndexAction.cpp @@ -186,7 +186,6 @@ std::unique_ptr createStaticIndexingAction( IndexOpts.SystemSymbolFilter = index::IndexingOptions::SystemSymbolFilterKind::All; Opts.CollectIncludePath = true; - Opts.CountReferences = true; if (Opts.Origin == SymbolOrigin::Unknown) Opts.Origin = SymbolOrigin::Static; Opts.StoreAllDocumentation = false; -- cgit v1.2.3