blob: 20a9f55b2095a55fcb61cadc2ced719938afe230 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +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