Anders Carlsson | e9b801f | 2011-02-22 01:52:06 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -verify -fobjc-exceptions %s |
Douglas Gregor | 324b54d | 2010-05-03 18:51:14 +0000 | [diff] [blame] | 2 | @interface A @end |
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}} |
Douglas Gregor | 324b54d | 2010-05-03 18:51:14 +0000 | [diff] [blame] | 11 | } @catch(A* a) { } |
Steve Naroff | f50cb36 | 2009-03-03 20:59:06 +0000 | [diff] [blame] | 12 | } |
| 13 | |