Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | void f() | ||||
4 | { | ||||
5 | try { | ||||
6 | ; | ||||
7 | } catch(int i) { | ||||
8 | ; | ||||
9 | } catch(...) { | ||||
10 | } | ||||
11 | } | ||||
12 | |||||
13 | void g() | ||||
14 | { | ||||
15 | try; // expected-error {{expected '{'}} | ||||
16 | |||||
17 | try {} | ||||
18 | catch; // expected-error {{expected '('}} | ||||
19 | |||||
20 | try {} | ||||
21 | catch (...); // expected-error {{expected '{'}} | ||||
22 | |||||
23 | try {} | ||||
24 | catch {} // expected-error {{expected '('}} | ||||
25 | } |