summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/CodeComplete.h
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2019-04-11 09:36:36 +0000
committerEric Liu <ioeric@google.com>2019-04-11 09:36:36 +0000
commit00d99bd1c4ad80dc909c74c39681978f843a44c6 (patch)
treef2bf9490f522f1fccb11a4e65e75a2d6c8db7d1a /clang-tools-extra/clangd/CodeComplete.h
parent6ef53b3bf2fcccfc97e9a47d17c44cbe1f2b4481 (diff)
downloadbcm5719-llvm-00d99bd1c4ad80dc909c74c39681978f843a44c6.tar.gz
bcm5719-llvm-00d99bd1c4ad80dc909c74c39681978f843a44c6.zip
[clangd] Use identifiers in file as completion candidates when build is not ready.
Summary: o Lex the code to get the identifiers and put them into a "symbol" index. o Adds a new completion mode without compilation/sema into code completion workflow. o Make IncludeInserter work even when no compile command is present, by avoiding inserting non-verbatim headers. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60126 llvm-svn: 358159
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.h')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h
index e1110dccc0d..9d43107a01e 100644
--- a/clang-tools-extra/clangd/CodeComplete.h
+++ b/clang-tools-extra/clangd/CodeComplete.h
@@ -225,7 +225,11 @@ struct SpeculativeFuzzyFind {
std::future<SymbolSlab> Result;
};
-/// Get code completions at a specified \p Pos in \p FileName.
+/// Gets code completions at a specified \p Pos in \p FileName.
+///
+/// If \p Preamble is nullptr, this runs code completion without compiling the
+/// code.
+///
/// If \p SpecFuzzyFind is set, a speculative and asynchronous fuzzy find index
/// request (based on cached request) will be run before parsing sema. In case
/// the speculative result is used by code completion (e.g. speculation failed),
OpenPOWER on IntegriCloud