HomePhabricator

[clangd] Add fallback mode for code completion when compile command or preamble…

Description

[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

Details

Committed
ioericApr 8 2019, 7:53 AM
Reviewer
sammccall
Differential Revision
D59811: [clangd] Add fallback mode for code completion when compile command or preamble is not ready.
Branches
Unknown
Tags
Unknown