Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Steve Naroff | 983df5b | 2007-10-16 20:39:36 +0000 | [diff] [blame] | 2 | |
Steve Naroff | 983df5b | 2007-10-16 20:39:36 +0000 | [diff] [blame] | 3 | @interface Foo |
| 4 | @end |
| 5 | |
| 6 | void test() { |
| 7 | Foo *fooObj; |
| 8 | id obj; |
| 9 | |
Fariborz Jahanian | 3d9ce90 | 2011-03-26 17:07:06 +0000 | [diff] [blame] | 10 | [[Foo alloc] init]; // expected-warning {{class method '+alloc' not found (return type defaults to 'id')}} expected-warning {{instance method '-init' not found (return type defaults to 'id')}} |
| 11 | [fooObj notdefined]; // expected-warning {{instance method '-notdefined' not found (return type defaults to 'id')}} |
Richard Trieu | 2fe9b7f | 2011-12-15 00:38:15 +0000 | [diff] [blame] | 12 | [obj whatever:1 :2 :3]; // expected-warning {{instance method '-whatever:::' not found (return type defaults to 'id')}} |
Steve Naroff | 983df5b | 2007-10-16 20:39:36 +0000 | [diff] [blame] | 13 | } |