[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 6 10:58:15 PST 2023


================
@@ -23,8 +23,27 @@ namespace clang {
 class CodeCompletionResult;
 class CompilerInstance;
 
-void codeComplete(CompilerInstance *InterpCI, llvm::StringRef Content,
-                  unsigned Line, unsigned Col, const CompilerInstance *ParentCI,
-                  std::vector<std::string> &CCResults);
+struct ReplCodeCompleter {
+  ReplCodeCompleter() = default;
+  std::string Prefix;
+
+  /*
+    @param InterpCI The compiler instance that is used to trigger code completion
+
+    @param Content The string where code completion is triggered.
+
+    @param Line The line number of the code completion point.
+
+    @param Col The column number of the code completion point.
+
+    @param ParentCI The running interpreter compiler instance that provides ASTContexts.
+
+    @param CCResults [out] The completion results.
+   */
----------------
vgvassilev wrote:

```suggestion
  /// Provides code completion results given a stem.
  ///
  /// \param InterpCI [in] The compiler instance that is used to trigger code completion
  /// \param Content [in] The string where code completion is triggered.
  /// \param Line [in] The line number of the code completion point.
  /// \param Col [in] The column number of the code completion point.
  /// \param ParentCI [in] The running interpreter compiler instance that provides ASTContexts.
  /// \param CCResults [out] The completion results.
```

https://github.com/llvm/llvm-project/pull/67349


More information about the cfe-commits mailing list