Mercurial > hg > CbC > CbC_llvm
view clang/test/Interpreter/simple-exception.cpp @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 1f2b6ac9f198 |
children |
line wrap: on
line source
// clang-format off // UNSUPPORTED: system-aix // XFAIL for arm, arm64, riscv, or running on Windows. // XFAIL: target={{(arm|riscv).*}}, system-windows // RUN: cat %s | clang-repl | FileCheck %s // Incompatible with msan. It passes with -O3 but fail -Oz. Interpreter // generates non-instrumented code, which may call back to instrumented. // UNSUPPORTED: msan 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