Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -verify %s |
Steve Naroff | f50cb36 | 2009-03-03 20:59:06 +0000 | [diff] [blame] | 2 | |
Steve Naroff | 9d40ee5 | 2009-03-03 21:16:54 +0000 | [diff] [blame] | 3 | @protocol P; |
| 4 | |
Steve Naroff | f50cb36 | 2009-03-03 20:59:06 +0000 | [diff] [blame] | 5 | void f() { |
| 6 | @try { |
Chris Lattner | 05af262 | 2009-04-12 08:25:48 +0000 | [diff] [blame] | 7 | } @catch (void a) { // expected-error{{@catch parameter is not a pointer to an interface type}} |
| 8 | } @catch (int) { // expected-error{{@catch parameter is not a pointer to an interface type}} |
| 9 | } @catch (int *b) { // expected-error{{@catch parameter is not a pointer to an interface type}} |
Steve Naroff | d198aba | 2009-03-03 23:13:51 +0000 | [diff] [blame] | 10 | } @catch (id <P> c) { // expected-error{{illegal qualifiers on @catch parameter}} |
Steve Naroff | f50cb36 | 2009-03-03 20:59:06 +0000 | [diff] [blame] | 11 | } |
| 12 | } |
| 13 | |