aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-try.cpp
blob: 76b85e840659a9e97a16f355a7d3e02551aa7a20 (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-cc -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 '('}}
}