Steve Naroff | 93a2595 | 2009-04-07 22:56:58 +0000 | [diff] [blame] | 1 | // RUN: clang-cc %s -verify -fsyntax-only |
| 2 | |
Chris Lattner | aec2002 | 2009-04-12 23:29:27 +0000 | [diff] [blame] | 3 | struct some_struct; |
| 4 | |
Steve Naroff | 93a2595 | 2009-04-07 22:56:58 +0000 | [diff] [blame] | 5 | // Note: NSException is not declared. |
| 6 | void f0(id x) { |
| 7 | @try { |
Chris Lattner | aec2002 | 2009-04-12 23:29:27 +0000 | [diff] [blame] | 8 | } @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 Naroff | 93a2595 | 2009-04-07 22:56:58 +0000 | [diff] [blame] | 12 | } |
| 13 | } |
| 14 | |