Reid Kleckner | 1d59f99 | 2015-01-22 01:36:17 +0000 | [diff] [blame^] | 1 | // RUN: not %clang_cc1 -triple x86_64-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 | __leave; |
| 11 | } __except (1) { |
| 12 | return 0; |
| 13 | } |
| 14 | *res = myres; |
| 15 | return 1; |
| 16 | } |
| 17 | // CHECK-NOT: error: |
| 18 | // CHECK: error: cannot compile this SEH __leave yet |
| 19 | // CHECK-NOT: error: |