blob: 920a1d59c747a0c86f15fc93363b8e7f489071ef [file] [log] [blame]
// RUN: clang -fsyntax-only -verify %s
struct A;
void f()
{
try {
} catch(int i) { // expected-note {{previous definition}}
int j = i;
int i; // expected-error {{redefinition of 'i'}}
} catch(float i) {
} catch(void v) { // expected-error {{cannot catch incomplete type 'void'}}
} catch(A a) { // expected-error {{cannot catch incomplete type 'struct A'}}
} catch(A *a) { // expected-error {{cannot catch pointer to incomplete type 'struct A'}}
} catch(A &a) { // expected-error {{cannot catch reference to incomplete type 'struct A'}}
} catch(...) {
int j = i; // expected-error {{use of undeclared identifier 'i'}}
}
}