1 // RUN: %clang_cc1 %s -verify -fsyntax-only -fobjc-exceptions 2 3 struct some_struct; 4 5 @interface NSObject 6 @end 7 8 // Note: NSException is not declared. 9 void f0(id x) { 10 @try { 11 } @catch (NSException *x) { // expected-error {{unknown type name 'NSException'}} 12 } @catch (struct some_struct x) { // expected-error {{@catch parameter is not a pointer to an interface type}} 13 } @catch (int x) { // expected-error {{@catch parameter is not a pointer to an interface type}} 14 } @catch (static NSObject *y) { // expected-error {{@catch parameter cannot have storage specifier 'static'}} 15 } @catch (...) { 16 } 17 } 18 19