Fariborz Jahanian | cc9c545 | 2008-01-25 17:43:39 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | @interface I |
| 4 | - (id) retain; |
| 5 | @end |
| 6 | |
| 7 | void __raiseExc1() { |
Chris Lattner | 1897de1 | 2009-03-09 21:19:16 +0000 | [diff] [blame] | 8 | [objc_lookUpClass("NSString") retain]; // expected-warning {{ "bad receiver type 'int'" }} \ |
| 9 | expected-warning {{method '-retain' not found}} |
Steve Naroff | 8676e08 | 2009-03-01 17:14:31 +0000 | [diff] [blame] | 10 | } |
| 11 | |
| 12 | typedef const struct __CFString * CFStringRef; |
| 13 | |
| 14 | void func() { |
| 15 | CFStringRef obj; |
| 16 | |
Chris Lattner | 1897de1 | 2009-03-09 21:19:16 +0000 | [diff] [blame] | 17 | [obj self]; // expected-warning {{bad receiver type 'CFStringRef' (aka 'struct __CFString const *')}} \\ |
| 18 | expected-warning {{method '-self' not found}} |
Fariborz Jahanian | cc9c545 | 2008-01-25 17:43:39 +0000 | [diff] [blame] | 19 | } |