13cc3be8fSSunho Kim // clang-format off 23cc3be8fSSunho Kim // UNSUPPORTED: system-aix 3*4f6757ceSJonas Hahnfeld // XFAIL for arm and arm64, or running on Windows. 4*4f6757ceSJonas Hahnfeld // XFAIL: target=arm{{.*}}, system-windows 53cc3be8fSSunho Kim // RUN: cat %s | clang-repl | FileCheck %s 69e270c64SVitaly Buka 79e270c64SVitaly Buka // Incompatible with msan. It passes with -O3 but fail -Oz. Interpreter 89e270c64SVitaly Buka // generates non-instrumented code, which may call back to instrumented. 99e270c64SVitaly Buka // UNSUPPORTED: msan 109e270c64SVitaly Buka 113cc3be8fSSunho Kim extern "C" int printf(const char *, ...); 123cc3be8fSSunho Kim f()133cc3be8fSSunho Kimint f() { throw "Simple exception"; return 0; } checkException()143cc3be8fSSunho Kimint checkException() { try { printf("Running f()\n"); f(); } catch (const char *e) { printf("%s\n", e); } return 0; } 153cc3be8fSSunho Kim auto r1 = checkException(); 163cc3be8fSSunho Kim // CHECK: Running f() 173cc3be8fSSunho Kim // CHECK-NEXT: Simple exception 183cc3be8fSSunho Kim 193cc3be8fSSunho Kim %quit 20