aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-try.cpp
blob: 642c8f6fe8f20130cc00d5ea56082db62a79c413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: clang -fsyntax-only -verify %s

void f()
{
  try {
    ;
  } catch(int i) {
    ;
  } catch(...) {
  }
}

void g()
{
  try; // expected-error {{expected '{'}}

  try {}
  catch; // expected-error {{expected '('}}

  try {}
  catch (...); // expected-error {{expected '{'}}

  try {}
  catch {} // expected-error {{expected '('}}
}