1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s 2 3@interface INTF 4- (void) meth; 5- (void) meth : (int) arg1; 6- (int) int_meth; // expected-note {{method 'int_meth' declared here}} 7+ (int) cls_meth; // expected-note {{method 'cls_meth' declared here}} 8+ (void) cls_meth1 : (int) arg1; // expected-note {{method 'cls_meth1:' declared here}} 9@end 10 11@implementation INTF // expected-warning {{method definition for 'int_meth' not found}} \ 12 // expected-warning {{method definition for 'cls_meth' not found}} \ 13 // expected-warning {{method definition for 'cls_meth1:' not found}} 14- (void) meth {} 15- (void) meth : (int) arg2{} 16- (void) cls_meth1 : (int) arg2{} 17@end 18 19@interface INTF1 20- (void) meth; 21- (void) meth : (int) arg1; 22- (int) int_meth; // expected-note {{method 'int_meth' declared here}} 23+ (int) cls_meth; // expected-note {{method 'cls_meth' declared here}} 24+ (void) cls_meth1 : (int) arg1; // expected-note {{method 'cls_meth1:' declared here}} 25@end 26 27@implementation INTF1 // expected-warning {{method definition for 'int_meth' not found}} \ 28 // expected-warning {{method definition for 'cls_meth' not found}} \ 29 // expected-warning {{method definition for 'cls_meth1:' not found}} 30- (void) meth {} 31- (void) meth : (int) arg2{} 32- (void) cls_meth1 : (int) arg2{} 33@end 34 35@interface INTF2 36- (void) meth; 37- (void) meth : (int) arg1; 38- (void) cls_meth1 : (int) arg1; 39@end 40 41@implementation INTF2 42- (void) meth {} 43- (void) meth : (int) arg2{} 44- (void) cls_meth1 : (int) arg2{} 45@end 46 47 48// rdar://8850818 49@interface Root @end 50 51@interface Foo : Root @end 52 53@implementation Foo 54 55- (void)someFunction { return; } 56 57+ (void)anotherFunction { 58 [self someFunction]; // expected-warning {{method '+someFunction' not found (return type defaults to 'id')}} 59} 60@end 61