brintos

brintos / llvm-project-archived public Read only

0
0
Text · 493 B · c59c4a5 Raw
22 lines · cpp
1// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s2 3class C {4public:5  C(int a, int b);6};7 8C::C(int a, // expected-note {{previous definition}}9     int b) // expected-note {{previous definition}}10try {11  int c;12} catch (int a) { // expected-error {{redefinition of 'a'}}13  int b; // expected-error {{redefinition of 'b'}}14  ++c; // expected-error {{use of undeclared identifier 'c'}}15}16 17void f(int i) {18  struct S {19    void g() try {} catch (int i) {}; // OK20  };21}22