Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -Wmissing-method-return-type -fsyntax-only -verify -Wno-objc-root-class %s |
Fariborz Jahanian | aab24a6 | 2011-07-21 17:00:47 +0000 | [diff] [blame] | 2 | // rdar://9615045 |
| 3 | |
| 4 | @interface I |
Richard Trieu | 2fe9b7f | 2011-12-15 00:38:15 +0000 | [diff] [blame] | 5 | - initWithFoo:(id)foo; // expected-warning {{method has no return type specified; defaults to 'id'}} |
Fariborz Jahanian | aab24a6 | 2011-07-21 17:00:47 +0000 | [diff] [blame] | 6 | @end |
| 7 | |
| 8 | @implementation I |
Richard Trieu | 2fe9b7f | 2011-12-15 00:38:15 +0000 | [diff] [blame] | 9 | - initWithFoo:(id)foo { return 0; } // expected-warning {{method has no return type specified; defaults to 'id'}} |
Fariborz Jahanian | aab24a6 | 2011-07-21 17:00:47 +0000 | [diff] [blame] | 10 | @end |
| 11 | |