[PATCH] D104898: [clang-repl] Allow passing in code as positional arguments.

Stefan Gränitz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 30 08:48:47 PDT 2021


sgraenitz accepted this revision.
sgraenitz added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang/test/Interpreter/execute.cpp:1
 // RUN: cat %s | clang-repl | FileCheck %s
+// RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
----------------
Maybe this could move down to line 8, so it's closer to the code that it works with?


================
Comment at: clang/tools/clang-repl/ClangRepl.cpp:90
 
+  if (!OptInputs.size()) {
+    llvm::LineEditor LE("clang-repl");
----------------
`OptInputs.empty()` ?


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

https://reviews.llvm.org/D104898



More information about the cfe-commits mailing list