Steve Naroff | 7e46145 | 2007-10-16 20:39:36 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | typedef struct objc_object *id; |
| 4 | @interface Foo |
| 5 | @end |
| 6 | |
| 7 | void test() { |
| 8 | Foo *fooObj; |
| 9 | id obj; |
| 10 | |
| 11 | [[Foo alloc] init]; // expected-warning {{method '+alloc' not found (return type defaults to 'id')}} expected-warning {{method '-init' not found (return type defaults to 'id')}} |
| 12 | [fooObj notdefined]; // expected-warning {{method '-notdefined' not found (return type defaults to 'id')}} |
| 13 | [obj whatever:1 :2 :3]; // expected-warning {{method '-whatever:::' not found (return type defaults to 'id'))}} |
| 14 | } |