1*67e74705SXin Li // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify %s 2*67e74705SXin Li 3*67e74705SXin Li int i; 4*67e74705SXin Li foo()5*67e74705SXin Livoid foo() { 6*67e74705SXin Li (throw,throw); 7*67e74705SXin Li (1 ? throw 1 : throw 2); 8*67e74705SXin Li throw int(1); 9*67e74705SXin Li throw; 10*67e74705SXin Li throw 1; 11*67e74705SXin Li throw; 12*67e74705SXin Li 1 ? throw : (void)42; 13*67e74705SXin Li __extension__ throw 1; // expected-error {{expected expression}} 14*67e74705SXin Li (void)throw; // expected-error {{expected expression}} 15*67e74705SXin Li } 16*67e74705SXin Li 17*67e74705SXin Li void f() throw(static); // expected-error {{expected a type}} expected-error {{does not allow storage class}} 18