[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

Jun Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 06:44:31 PDT 2023


junaire marked 9 inline comments as done.
junaire added inline comments.


================
Comment at: clang/include/clang/Interpreter/Interpreter.h:119
+
+  std::unique_ptr<llvm::Module> GenModule();
+
----------------
v.g.vassilev wrote:
> We should not need this interface.
`Interpreter::CompileDecl` needs it. So we don't have to do a dummy `Interp.Parse("")` to get a llvm::Module.


================
Comment at: clang/lib/Parse/ParseStmt.cpp:551
+    ConsumeAnyToken();
+    setPrettyPrintMode();
+  } else {
----------------
v.g.vassilev wrote:
> I think the cleaner solution here is to remove the global flag and pass it `handleExprStmt` and extend `Sema::ActOnExprStmt`.
I dont understand, can you elaborate a bit?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141215/new/

https://reviews.llvm.org/D141215



More information about the cfe-commits mailing list