clang 19.0.0git
CodeCompletion.h
Go to the documentation of this file.
1//===----- CodeCompletion.h - Code Completion for ClangRepl ---===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the classes which performs code completion at the REPL.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_INTERPRETER_CODE_COMPLETION_H
14#define LLVM_CLANG_INTERPRETER_CODE_COMPLETION_H
15#include <string>
16#include <vector>
17
18namespace llvm {
19class StringRef;
20} // namespace llvm
21
22namespace clang {
23class CodeCompletionResult;
24class CompilerInstance;
25
27 ReplCodeCompleter() = default;
28 std::string Prefix;
29
30 /// \param InterpCI [in] The compiler instance that is used to trigger code
31 /// completion
32
33 /// \param Content [in] The string where code completion is triggered.
34
35 /// \param Line [in] The line number of the code completion point.
36
37 /// \param Col [in] The column number of the code completion point.
38
39 /// \param ParentCI [in] The running interpreter compiler instance that
40 /// provides ASTContexts.
41
42 /// \param CCResults [out] The completion results.
43 void codeComplete(CompilerInstance *InterpCI, llvm::StringRef Content,
44 unsigned Line, unsigned Col,
45 const CompilerInstance *ParentCI,
46 std::vector<std::string> &CCResults);
47};
48} // namespace clang
49#endif
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.
Definition: Dominators.h:30
void codeComplete(CompilerInstance *InterpCI, llvm::StringRef Content, unsigned Line, unsigned Col, const CompilerInstance *ParentCI, std::vector< std::string > &CCResults)