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

Fred Fu via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 08:50:25 PST 2023


================
@@ -37,16 +39,15 @@ static std::vector<std::string> runComp(clang::Interpreter &MainInterp,
 
   std::vector<std::string> Results;
   std::vector<std::string> Comps;
-
-  codeComplete(
-      const_cast<clang::CompilerInstance *>((*Interp)->getCompilerInstance()),
-      Prefix, /* Lines */ 1, Prefix.size(), MainInterp.getCompilerInstance(),
-      Results);
+  auto *MainCI =
+      const_cast<clang::CompilerInstance *>((*Interp)->getCompilerInstance());
----------------
capfredf wrote:

This won't work. Interp is of `Expected<std::unique_ptr<Interpreter>>`

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


More information about the cfe-commits mailing list