Mercurial > hg > CbC > CbC_llvm
view clang/test/Interpreter/simple-exception.cpp @ 237:c80f45b162ad llvm-original
add some fix
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:47:54 +0900 |
parents | c4bab56944e8 |
children | 1f2b6ac9f198 |
line wrap: on
line source
// 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