xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/exceptions-seh.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1 // RUN: not %clang_cc1 -triple i686-pc-win32 -fexceptions -fms-extensions -emit-llvm -o - %s 2>&1 | FileCheck %s
2 
3 // This is a codegen test because we only emit the diagnostic when we start
4 // generating code.
5 
6 int SaveDiv(int numerator, int denominator, int *res) {
7   int myres = 0;
8   __try {
9     myres = numerator / denominator;
10   } __except (1) {
11     return 0;
12   }
13   *res = myres;
14   return 1;
15 }
16 // CHECK-NOT error
17 // CHECK: error: cannot compile this SEH __try yet
18 // CHECK-NOT error
19