Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Interpreter / simple-exception.cpp
blob6749acd6e6bd23b978d026c82fa340db67281195
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
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
11 extern "C" int printf(const char *, ...);
13 int f() { throw "Simple exception"; return 0; }
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
19 %quit