Fix the clang-wpa example.
[clang.git] / test / SemaObjC / stmts.m
blobd1e2ad3612e008466ba3e6db5a94ecea9bef1218
1 // RUN: %clang_cc1 %s -verify -fsyntax-only
3 struct some_struct;
5 @interface NSObject
6 @end
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   }