llvm-project/clang-tools-extra/clangd
Kadir Cetinkaya 70674549f1 [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
2019-05-09 14:22:07 +00:00
..
benchmarks Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
clients/clangd-vscode [clangd] Bump vscode-clangd v0.0.12. 2019-03-27 16:01:25 +00:00
fuzzer clangd-fuzzer: repair the build 2019-04-10 19:16:14 +00:00
include-mapping [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages. 2019-05-02 09:34:30 +00:00
index [clangd] Count number of references while merging RefSlabs inside FileIndex 2019-05-09 14:22:07 +00:00
indexer [clangd] Count number of references while merging RefSlabs inside FileIndex 2019-05-09 14:22:07 +00:00
refactor [clangd] Add test that r360116 accidentally fixed a duplicate-edits bug in rename. NFC 2019-05-07 07:45:41 +00:00
test [clangd] Boost code completion results that were named in the last few lines. 2019-05-06 10:25:10 +00:00
tool [clangd] Support -fallback-style, similar to clang-format. 2019-05-06 08:11:59 +00:00
unittests [clangd] Count number of references while merging RefSlabs inside FileIndex 2019-05-09 14:22:07 +00:00
xpc gn build: Add build files for clangd xpc framework code 2019-04-03 12:33:19 +00:00
AST.cpp [clangd] Print template arguments helper 2019-04-12 10:09:14 +00:00
AST.h [clangd] Print template arguments helper 2019-04-12 10:09:14 +00:00
CMakeLists.txt [clangd] Introduce intermediate representation of formatted text 2019-05-07 14:18:18 +00:00
Cancellation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Cancellation.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangdLSPServer.cpp [clangd] Oops, switchSourceHeader still needs to return a URI. 2019-05-07 08:30:32 +00:00
ClangdLSPServer.h [clangd] Oops, switchSourceHeader still needs to return a URI. 2019-05-07 08:30:32 +00:00
ClangdServer.cpp [clangd] Move Rename into its own file, and add unit test. NFC 2019-05-07 07:11:56 +00:00
ClangdServer.h [clangd] Remove unused ClangdServer::dynamicIndex(). NFC 2019-04-26 09:36:22 +00:00
ClangdUnit.cpp [clangd] Move Rename into its own file, and add unit test. NFC 2019-05-07 07:11:56 +00:00
ClangdUnit.h [clangd] Move Rename into its own file, and add unit test. NFC 2019-05-07 07:11:56 +00:00
CodeComplete.cpp [clangd] Expose whether no-compile completion was used. 2019-05-06 12:03:26 +00:00
CodeComplete.h [clangd] Expose whether no-compile completion was used. 2019-05-06 12:03:26 +00:00
CodeCompletionStrings.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeCompletionStrings.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Compiler.cpp [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC 2019-04-04 12:56:03 +00:00
Compiler.h [clangd] Wait for compile command in ASTWorker instead of ClangdServer 2019-04-15 12:32:28 +00:00
Context.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Context.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Diagnostics.cpp [clangd] Surface diagnostics from headers inside main file 2019-04-29 10:25:44 +00:00
Diagnostics.h [clangd] Surface diagnostics from headers inside main file 2019-04-29 10:25:44 +00:00
DraftStore.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DraftStore.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExpectedTypes.cpp Added missing license headers 2019-02-28 14:01:11 +00:00
ExpectedTypes.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FS.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FS.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FSProvider.cpp [clangd] Unlink VFS working dir from OS working dir. Reland of r351051 2019-02-15 11:04:25 +00:00
FSProvider.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Features.inc.in [clangd] XPC transport layer 2019-01-16 00:24:22 +00:00
FileDistance.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileDistance.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FindSymbols.cpp [clangd] Boost code completion results that were named in the last few lines. 2019-05-06 10:25:10 +00:00
FindSymbols.h [clangd] Add support for type hierarchy (super types only for now) 2019-03-19 09:27:04 +00:00
FormattedString.cpp [clangd] Introduce intermediate representation of formatted text 2019-05-07 14:18:18 +00:00
FormattedString.h [clangd] Introduce intermediate representation of formatted text 2019-05-07 14:18:18 +00:00
Function.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzyMatch.cpp [clangd] Tune the fuzzy-matching algorithm 2019-03-15 14:00:49 +00:00
FuzzyMatch.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalCompilationDatabase.cpp [clangd] Wait for compile command in ASTWorker instead of ClangdServer 2019-04-15 12:32:28 +00:00
GlobalCompilationDatabase.h [clangd] Filter out plugin related flags and move all commandline manipulations into OverlayCDB. 2019-01-22 09:10:20 +00:00
Headers.cpp [clangd] Check file path of declaring header when deciding whether to insert include. 2019-04-16 14:35:49 +00:00
Headers.h [clangd] Check file path of declaring header when deciding whether to insert include. 2019-04-16 14:35:49 +00:00
IncludeFixer.cpp [clangd] Check file path of declaring header when deciding whether to insert include. 2019-04-16 14:35:49 +00:00
IncludeFixer.h Moved Symbol into its own header and implementation file 2019-02-28 13:23:03 +00:00
JSONTransport.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Logger.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Logger.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Path.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Protocol.cpp [clangd] Support relatedInformation in diagnostics. 2019-04-18 15:17:07 +00:00
Protocol.h [clangd] Minor code style cleanups in Protocol.h. NFC 2019-05-03 08:03:21 +00:00
Quality.cpp [clangd] Boost code completion results that were named in the last few lines. 2019-05-06 10:25:10 +00:00
Quality.h [clangd] Boost code completion results that were named in the last few lines. 2019-05-06 10:25:10 +00:00
RIFF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RIFF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Selection.cpp [clangd] Fix a crash in Selection 2019-02-20 19:26:39 +00:00
Selection.h [clangd] Lib to compute and represent selection under cursor. 2019-02-01 15:05:11 +00:00
SourceCode.cpp [clangd] Boost code completion results that were named in the last few lines. 2019-05-06 10:25:10 +00:00
SourceCode.h [clangd] Boost code completion results that were named in the last few lines. 2019-05-06 10:25:10 +00:00
StdSymbolMap.inc [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages. 2019-05-02 09:34:30 +00:00
TUScheduler.cpp [clangd] Wait for compile command in ASTWorker instead of ClangdServer 2019-04-15 12:32:28 +00:00
TUScheduler.h [clangd] Wait for compile command in ASTWorker instead of ClangdServer 2019-04-15 12:32:28 +00:00
Threading.cpp [clangd] Use llvm::set_thread_priority in background-index 2019-04-18 13:46:40 +00:00
Threading.h [clangd] Use llvm::set_thread_priority in background-index 2019-04-18 13:46:40 +00:00
Trace.cpp [clangd] Use JSON streaming API for Trace rather than pasting strings. NFC 2019-04-25 16:37:07 +00:00
Trace.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Transport.h [clangd] Use #if CLANGD_BUILD_XPC because it may be defined as 0 2019-04-10 15:45:54 +00:00
URI.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
URI.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRefs.cpp [clangd] Also perform merging for symbol definitions 2019-05-03 12:11:14 +00:00
XRefs.h [clangd] Add support for type hierarchy (super types only for now) 2019-03-19 09:27:04 +00:00