blob: 1d4ea0a771897d8a24fc73f340ca5fa688ed3f30 [file] [log] [blame]
Steve Naroff93a25952009-04-07 22:56:58 +00001// RUN: clang-cc %s -verify -fsyntax-only
2
Chris Lattneraec20022009-04-12 23:29:27 +00003struct some_struct;
4
Steve Naroff93a25952009-04-07 22:56:58 +00005// Note: NSException is not declared.
6void f0(id x) {
7 @try {
Chris Lattneraec20022009-04-12 23:29:27 +00008 } @catch (NSException *x) { // expected-error {{unknown type name 'NSException'}}
9 } @catch (struct some_struct x) { // expected-error {{@catch parameter is not a pointer to an interface type}}
10 } @catch (int x) { // expected-error {{@catch parameter is not a pointer to an interface type}}
11 } @catch (...) {
Steve Naroff93a25952009-04-07 22:56:58 +000012 }
13}
14