From 00d99bd1c4ad80dc909c74c39681978f843a44c6 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Thu, 11 Apr 2019 09:36:36 +0000 Subject: [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 --- clang-tools-extra/clangd/SourceCode.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang-tools-extra/clangd/SourceCode.h') diff --git a/clang-tools-extra/clangd/SourceCode.h b/clang-tools-extra/clangd/SourceCode.h index 55289e00719..45593768023 100644 --- a/clang-tools-extra/clangd/SourceCode.h +++ b/clang-tools-extra/clangd/SourceCode.h @@ -156,6 +156,10 @@ llvm::Expected cleanupAndFormat(StringRef Code, const tooling::Replacements &Replaces, const format::FormatStyle &Style); +/// Collects identifiers with counts in the source code. +llvm::StringMap collectIdentifiers(llvm::StringRef Content, + const format::FormatStyle &Style); + } // namespace clangd } // namespace clang #endif -- cgit v1.2.3