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

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 09:00:21 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());
----------------
vgvassilev wrote:

Then just drop the `const_cast` we should not need it.

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


More information about the cfe-commits mailing list