1 // clang-format off
2 // UNSUPPORTED: system-aix
3 // XFAIL for arm and arm64, or running on Windows.
4 // XFAIL: target=arm{{.*}}, system-windows
5 // RUN: cat %s | clang-repl | FileCheck %s
6
7 // Incompatible with msan. It passes with -O3 but fail -Oz. Interpreter
8 // generates non-instrumented code, which may call back to instrumented.
9 // UNSUPPORTED: msan
10
11 extern "C" int printf(const char *, ...);
12
f()13 int f() { throw "Simple exception"; return 0; }
checkException()14 int checkException() { try { printf("Running f()\n"); f(); } catch (const char *e) { printf("%s\n", e); } return 0; }
15 auto r1 = checkException();
16 // CHECK: Running f()
17 // CHECK-NEXT: Simple exception
18
19 %quit
20