blob: a1be710fb5c00a3e87a60654076af320e9f3e854 [file] [log] [blame]
Anders Carlssonabea9512011-02-28 00:40:07 +00001// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify %s
Mike Stump6ce0c392009-05-15 21:47:08 +00002
3int i;
4
5void foo() {
6 (throw,throw);
7 (1 ? throw 1 : throw 2);
8 throw int(1);
9 throw;
10 throw 1;
11 throw;
12 1 ? throw : (void)42;
Mike Stump8d286632009-05-16 04:31:34 +000013 __extension__ throw 1; // expected-error {{expected expression}}
Mike Stump6ce0c392009-05-15 21:47:08 +000014 (void)throw; // expected-error {{expected expression}}
15}
Richard Smitha971d242012-05-09 20:55:26 +000016
17void f() throw(static); // expected-error {{expected a type}} expected-error {{does not allow storage class}}