blob: dea4ea6ded4f685584b32e20bdfc6206021316b1 [file] [edit]
// clang-format off
// XFAIL for arm, arm64e, or running on Windows.
// XFAIL: target=arm-{{.*}}, target=armv{{.*}}, host-jit-triple=arm64e-{{.*}}, system-windows, system-cygwin
// RUN: cat %s | clang-repl | FileCheck %s
// Incompatible with msan. It passes with -O3 but fail -Oz. Interpreter
// generates non-instrumented code, which may call back to instrumented.
// UNSUPPORTED: msan
extern "C" int printf(const char *, ...);
int f() { throw "Simple exception"; return 0; }
int checkException() { try { printf("Running f()\n"); f(); } catch (const char *e) { printf("%s\n", e); } return 0; }
auto r1 = checkException();
// CHECK: Running f()
// CHECK-NEXT: Simple exception
%quit