1 // Objective-C recovery 2 // RUN: cp %s %t 3 // RUN: %clang_cc1 -Wmissing-method-return-type -fixit -x objective-c %t 4 // RUN: %clang_cc1 -fsyntax-only -pedantic -Wmissing-method-return-type -Werror -x objective-c %t 5 6 // Objective-C++ recovery 7 // RUN: cp %s %t 8 // RUN: %clang_cc1 -Wmissing-method-return-type -fixit -x objective-c++ %t 9 // RUN: %clang_cc1 -fsyntax-only -pedantic -Wmissing-method-return-type -Werror -x objective-c++ %t 10 // rdar://9615045 11 12 @interface I 13 - initWithFoo:(id)foo; // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}} 14 - Meth; 15 -Meth1; 16 @end 17 18 @implementation I 19 - initWithFoo:(id)foo { return 0; } // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}} 20 21 -Meth { return 0;} 22 - Meth1 { return 0;} 23 @end 24 25