2009-04-08 02:56:58 +04:00
|
|
|
// RUN: clang-cc %s -verify -fsyntax-only
|
|
|
|
|
2009-04-13 03:29:27 +04:00
|
|
|
struct some_struct;
|
|
|
|
|
2009-04-08 02:56:58 +04:00
|
|
|
// Note: NSException is not declared.
|
|
|
|
void f0(id x) {
|
|
|
|
@try {
|
2009-04-13 03:29:27 +04:00
|
|
|
} @catch (NSException *x) { // expected-error {{unknown type name 'NSException'}}
|
|
|
|
} @catch (struct some_struct x) { // expected-error {{@catch parameter is not a pointer to an interface type}}
|
|
|
|
} @catch (int x) { // expected-error {{@catch parameter is not a pointer to an interface type}}
|
|
|
|
} @catch (...) {
|
2009-04-08 02:56:58 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|