llvm-project/clang/test/Interpreter/simple-exception.cpp
Sunho Kim 773d51ce3b [clang-repl] XFAIL windows properly in simple-exception test case.
We don't have proper exception support in LLJIT on windows yet. We have to xfail windows machine, but the previous check missed out some targets.
2022-08-01 09:06:35 +09:00

13 lines
430 B
C++

// clang-format off
// UNSUPPORTED: system-aix
// XFAIL: arm, arm64-apple, system-windows
// 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