blob: 1402b288b3e8fcb6c65cb68921a3db4f3c9b0ed0 [file] [log] [blame]
Fariborz Jahanian1147c5e2009-12-14 17:36:25 +00001// RUN: clang -cc1 %s -verify -fsyntax-only
Steve Naroff93a25952009-04-07 22:56:58 +00002
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