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