Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:56

0001 //===----- CodeCompletion.h - Code Completion for ClangRepl ---===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines the classes which performs code completion at the REPL.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_CLANG_INTERPRETER_CODE_COMPLETION_H
0014 #define LLVM_CLANG_INTERPRETER_CODE_COMPLETION_H
0015 #include <string>
0016 #include <vector>
0017 
0018 namespace llvm {
0019 class StringRef;
0020 } // namespace llvm
0021 
0022 namespace clang {
0023 class CodeCompletionResult;
0024 class CompilerInstance;
0025 
0026 struct ReplCodeCompleter {
0027   ReplCodeCompleter() = default;
0028   std::string Prefix;
0029 
0030   /// \param InterpCI [in] The compiler instance that is used to trigger code
0031   /// completion
0032 
0033   /// \param Content [in] The string where code completion is triggered.
0034 
0035   /// \param Line [in] The line number of the code completion point.
0036 
0037   /// \param Col [in] The column number of the code completion point.
0038 
0039   /// \param ParentCI [in] The running interpreter compiler instance that
0040   /// provides ASTContexts.
0041 
0042   /// \param CCResults [out] The completion results.
0043   void codeComplete(CompilerInstance *InterpCI, llvm::StringRef Content,
0044                     unsigned Line, unsigned Col,
0045                     const CompilerInstance *ParentCI,
0046                     std::vector<std::string> &CCResults);
0047 };
0048 } // namespace clang
0049 #endif