llvm-project/clang-tools-extra/clangd
Eric Liu dd02825937 [clangd] Add fallback mode for code completion when compile command or preamble is not ready.
Summary:
When calling TUScehduler::runWithPreamble (e.g. in code compleiton), allow
entering a fallback mode when compile command or preamble is not ready, instead of
waiting. This allows clangd to perform naive code completion e.g. using identifiers
in the current file or symbols in the index.

This patch simply returns empty result for code completion in fallback mode. Identifier-based
plus more advanced index-based completion will be added in followup patches.

Reviewers: ilya-biryukov, sammccall

Reviewed By: sammccall

Subscribers: sammccall, javed.absar, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 357916
2019-04-08 14:53:16 +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 Fix clangd-fuzzer build 2019-04-04 14:08:35 +00:00
include-mapping [clangd] Add std subnamespace symbols to the symbol map. 2019-03-25 13:14:10 +00:00
index [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC 2019-04-04 12:56:03 +00:00
indexer gn build: Add check-clang-tools to run clang-tools-extra lit tests 2019-03-29 02:49:13 +00:00
refactor gn build: Add some build files for clangd 2019-03-28 16:53:32 +00:00
tool [clangd] Add fallback mode for code completion when compile command or preamble is not ready. 2019-04-08 14:53:16 +00:00
xpc gn build: Add build files for clangd xpc framework code 2019-04-03 12:33:19 +00:00
AST.cpp Revert "[clangd] Print arguments in template specializations" 2019-03-20 22:51:56 +00:00
AST.h Moved Ref into its own header and implementation file 2019-02-28 13:49:25 +00:00
CMakeLists.txt Use a cmake check for linux that actually works. 2019-04-04 13:54:01 +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 clangd::TextEdit in ClangdServer::rename. NFC 2019-04-03 07:18:43 +00:00
ClangdLSPServer.h [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension 2019-03-27 17:47:49 +00:00
ClangdServer.cpp [clangd] Add fallback mode for code completion when compile command or preamble is not ready. 2019-04-08 14:53:16 +00:00
ClangdServer.h [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC 2019-04-04 12:56:03 +00:00
ClangdUnit.cpp [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC 2019-04-04 12:56:03 +00:00
ClangdUnit.h [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC 2019-04-04 12:56:03 +00:00
CodeComplete.cpp [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC 2019-04-04 12:56:03 +00:00
CodeComplete.h [clangd] Add fallback mode for code completion when compile command or preamble is not ready. 2019-04-08 14:53:16 +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] Stop passing around PCHContainerOperations, just create it in place. NFC 2019-04-04 12:56:03 +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] Add Source to clangd::Diagnostic. 2019-03-06 10:51:38 +00:00
Diagnostics.h [clangd] Add Source to clangd::Diagnostic. 2019-03-06 10:51:38 +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] Add support for type hierarchy (super types only for now) 2019-03-19 09:27:04 +00:00
FindSymbols.h [clangd] Add support for type hierarchy (super types only for now) 2019-03-19 09:27:04 +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] Adjust compile commands to be applicable for tooling 2019-03-08 08:38:25 +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] Suggest adding missing includes for incomplete type diagnostics. 2019-01-28 14:01:55 +00:00
Headers.h Moved Symbol into its own header and implementation file 2019-02-28 13:23:03 +00:00
IncludeFixer.cpp Moved Ref into its own header and implementation file 2019-02-28 13:49:25 +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 Fix MSVC "not all control paths return a value" warning. NFCI. 2019-03-29 13:43:00 +00:00
Protocol.h [clangd] Support UTF-32 (i.e. codepoint) offsets. 2019-03-28 14:37:51 +00:00
Quality.cpp Moved Ref into its own header and implementation file 2019-02-28 13:49:25 +00:00
Quality.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +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] Support UTF-32 (i.e. codepoint) offsets. 2019-03-28 14:37:51 +00:00
SourceCode.h [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension 2019-03-27 17:47:49 +00:00
StdSymbolMap.inc [clangd] Add std subnamespace symbols to the symbol map. 2019-03-25 13:14:10 +00:00
TUScheduler.cpp [clangd] Add fallback mode for code completion when compile command or preamble is not ready. 2019-04-08 14:53:16 +00:00
TUScheduler.h [clangd] Add fallback mode for code completion when compile command or preamble is not ready. 2019-04-08 14:53:16 +00:00
Threading.cpp [clangd] Set thread priority on Windows 2019-02-27 10:16:03 +00:00
Threading.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Trace.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +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 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +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] Add support for type hierarchy (super types only for now) 2019-03-19 09:27:04 +00:00
XRefs.h [clangd] Add support for type hierarchy (super types only for now) 2019-03-19 09:27:04 +00:00