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