[PATCH] D107049: [clang-repl] Re-implement clang-interpreter as a test case.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 5 11:13:33 PDT 2021


v.g.vassilev added inline comments.


================
Comment at: clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp:102
+  } catch (...) {
+    printf("Unknown exception\n");
+  }
----------------
karies wrote:
> How is that provoking a test failure? What about `exit(1)` or whatever works for gtest?
we use EXPECT_ANY_THROW and expect output on the stdout. I guess that line is not reachable.


================
Comment at: clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp:104
+  }
+  ThrowerAnError("From JIT");
+  return 0;
----------------
karies wrote:
> To me, the wording difference between "In JIT" and "From JIT" doesn't signal anything. Maybe "the first could be "To be caught in JIT" and the second "To be caught in binary"?
The intent was to show that we can move the clang-interpreter example with relatively small amount of changes to the libInterpreter interfaces. we have changed that goal significantly and maybe we should also change the strings, too.


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

https://reviews.llvm.org/D107049



More information about the cfe-commits mailing list