Chris Lattner | bce6135 | 2008-07-26 00:20:22 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
Chris Lattner | 62f5f7f | 2008-07-26 00:46:50 +0000 | [diff] [blame^] | 2 | // rdar://5986251 |
Chris Lattner | bce6135 | 2008-07-26 00:20:22 +0000 | [diff] [blame] | 3 | |
| 4 | @protocol SomeProtocol |
Chris Lattner | 62f5f7f | 2008-07-26 00:46:50 +0000 | [diff] [blame^] | 5 | - (void) bar; |
Chris Lattner | bce6135 | 2008-07-26 00:20:22 +0000 | [diff] [blame] | 6 | @end |
| 7 | |
| 8 | void foo(id x) { |
| 9 | bar((short<SomeProtocol>)x); // expected-error {{expected ')'}} expected-error {{to match this '('}} |
| 10 | bar((<SomeProtocol>)x); // expected-warning {{protocol qualifiers without 'id' is archaic}} |
Chris Lattner | 62f5f7f | 2008-07-26 00:46:50 +0000 | [diff] [blame^] | 11 | |
| 12 | [(<SomeProtocol>)x bar]; // expected-warning {{protocol qualifiers without 'id' is archaic}} |
Chris Lattner | bce6135 | 2008-07-26 00:20:22 +0000 | [diff] [blame] | 13 | } |
| 14 | |