1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm-only %s -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -verify -DTRY 2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm-only %s -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -verify -DTHROW 3*0a6a1f1dSLionel Sambuc 4*0a6a1f1dSLionel Sambuc void external(); 5*0a6a1f1dSLionel Sambuc not_emitted()6*0a6a1f1dSLionel Sambucinline void not_emitted() { 7*0a6a1f1dSLionel Sambuc throw int(13); // no error 8*0a6a1f1dSLionel Sambuc } 9*0a6a1f1dSLionel Sambuc main()10*0a6a1f1dSLionel Sambucint main() { 11*0a6a1f1dSLionel Sambuc int rv = 0; 12*0a6a1f1dSLionel Sambuc #ifdef TRY 13*0a6a1f1dSLionel Sambuc try { // expected-error {{cannot compile this try statement yet}} 14*0a6a1f1dSLionel Sambuc external(); 15*0a6a1f1dSLionel Sambuc } catch (int) { 16*0a6a1f1dSLionel Sambuc rv = 1; 17*0a6a1f1dSLionel Sambuc } 18*0a6a1f1dSLionel Sambuc #endif 19*0a6a1f1dSLionel Sambuc #ifdef THROW 20*0a6a1f1dSLionel Sambuc throw int(42); // expected-error {{cannot compile this throw expression yet}} 21*0a6a1f1dSLionel Sambuc #endif 22*0a6a1f1dSLionel Sambuc return rv; 23*0a6a1f1dSLionel Sambuc } 24