2022-07-28 20:14:58 +08:00
|
|
|
// clang-format off
|
|
|
|
// UNSUPPORTED: system-aix
|
2022-08-01 08:06:35 +08:00
|
|
|
// XFAIL: arm, arm64-apple, system-windows
|
2022-07-28 20:14:58 +08:00
|
|
|
// RUN: cat %s | clang-repl | FileCheck %s
|
|
|
|
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
|