Fariborz Jahanian | 1dad5b2 | 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 | 4018a28 | 2009-03-11 03:47:47 +0000 | [diff] [blame] | 8 | [objc_lookUpClass("NSString") retain]; // expected-warning {{receiver type 'int' is not 'id'}} \ |
Chris Lattner | 0c73f37 | 2009-03-09 21:19:16 +0000 | [diff] [blame] | 9 | expected-warning {{method '-retain' not found}} |
Steve Naroff | 8e2945a | 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 | 4018a28 | 2009-03-11 03:47:47 +0000 | [diff] [blame] | 17 | [obj self]; // expected-warning {{receiver type 'CFStringRef' (aka 'struct __CFString const *') is not 'id'}} \\ |
Chris Lattner | 0c73f37 | 2009-03-09 21:19:16 +0000 | [diff] [blame] | 18 | expected-warning {{method '-self' not found}} |
Fariborz Jahanian | 1dad5b2 | 2008-01-25 17:43:39 +0000 | [diff] [blame] | 19 | } |