llvm-project/clang-tools-extra/clangd
Haojian Wu b5ce4e5ea3 [clangd] Perform merge for main file symbols.
Summary:
Previously, we randomly pick one main file symbol in dynamic index, we
may loose the ideal symbol (with definition location) in the index.

It fixes the issue where sometimes we fail to go to the symbol definition, see:

1. call go-to-decl on Foo in Foo.cpp
2. jump to Foo.h, call go-to-def on Foo in Foo.h

we can't go back to Foo.cpp -- because we open Foo.cpp, Foo.h in clangd, both
files have Foo symbol (one with def&decl, one with decl only), we randomely
choose one.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63425

llvm-svn: 363568
2019-06-17 14:49:18 +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.15. 2019-06-17 13:18:24 +00:00
fuzzer clangd-fuzzer: repair the build 2019-04-10 19:16:14 +00:00
include-mapping [clangd] Another improvement for std include mapping. 2019-05-29 12:03:41 +00:00
index [clangd] Perform merge for main file symbols. 2019-06-17 14:49:18 +00:00
indexer [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
refactor Test commit 2019-06-14 09:40:42 +00:00
test [clangd] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00
tool [clangd] Remove old hidden -use-dex-index flag 2019-06-10 20:38:16 +00:00
unittests [clangd] Perform merge for main file symbols. 2019-06-17 14:49:18 +00:00
xpc Support codesigning bundles and forcing 2019-05-30 22:25:48 +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] Revamp textDocument/onTypeFormatting. 2019-06-10 14:26:21 +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] Return TextEdits from ClangdServer::applyTweak 2019-06-12 12:03:24 +00:00
ClangdLSPServer.h [clangd] Support offsets for parameters in signatureHelp 2019-06-04 09:36:59 +00:00
ClangdServer.cpp [clangd] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00
ClangdServer.h [clangd] Return TextEdits from ClangdServer::applyTweak 2019-06-12 12:03:24 +00:00
ClangdUnit.cpp [clangd] Respect WarningsAsErrors configuration for clang-tidy 2019-05-19 04:19:14 +00:00
ClangdUnit.h [clangd] Add SourceManager accessor to ParsedAST. NFC 2019-05-28 21:52:34 +00:00
CodeComplete.cpp [clangd] Remove unused signature help quality signal. NFC 2019-06-06 08:32:25 +00:00
CodeComplete.h [clangd] Turn no-parse-completion on by when preamble isn't ready. Add flag to force it. 2019-05-21 13:40:31 +00:00
CodeCompletionStrings.cpp [clangd] Place cursor better after completing patterns 2019-05-28 15:33:37 +00:00
CodeCompletionStrings.h [clangd] Place cursor better after completing patterns 2019-05-28 15:33:37 +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] Fixed clangd diagnostics priority 2019-06-13 12:31:36 +00:00
Diagnostics.h [clangd] Respect WarningsAsErrors configuration for clang-tidy 2019-05-19 04:19:14 +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 [clangd] Compute expected type for templates 2019-05-28 13:56:21 +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] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00
FindSymbols.h [clangd] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00
Format.cpp [clangd] Fix gcc warning by removing extra ";" 2019-06-11 06:02:01 +00:00
Format.h [clangd] Revamp textDocument/onTypeFormatting. 2019-06-10 14:26:21 +00:00
FormattedString.cpp [clangd] Represent Hover result using FormattedString 2019-05-29 10:01:00 +00:00
FormattedString.h [clangd] Represent Hover result using FormattedString 2019-05-29 10:01:00 +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] Also apply adjustArguments when returning fallback commands 2019-06-04 13:38:36 +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] Stop marshalling/requiring FormattingOptions. We never did anything with them. 2019-06-10 13:01:49 +00:00
Protocol.h [clangd] Stop marshalling/requiring FormattingOptions. We never did anything with them. 2019-06-10 13:01:49 +00:00
Quality.cpp [clangd] Remove unused signature help quality signal. NFC 2019-06-06 08:32:25 +00:00
Quality.h [clangd] Remove unused signature help quality signal. NFC 2019-06-06 08:32:25 +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] Another improvement for std include mapping. 2019-05-29 12:03:41 +00:00
TUScheduler.cpp [clangd] Fix typo in GUARDED_BY() 2019-06-12 11:01:19 +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] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00
XRefs.h [clangd] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00