41 lines · plain
1// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify -Wno-objc-root-class %s2 3@interface foo4- (int)meth;5@end6 7@implementation foo8- (int) meth { return [self meth]; }9@end10 11// PR270812@interface MyClass13+- (void)myMethod; // expected-error {{expected selector for Objective-C method}}14- (vid)myMethod2; // expected-error {{expected a type}}15@end16 17@implementation MyClass18- (void)myMethod { }19- (vid)myMethod2 { } // expected-error {{expected a type}}20 21@end22 23 24@protocol proto;25@protocol NSObject;26 27//@protocol GrowlPluginHandler <NSObject> @end28 29 30@interface SomeClass231- (int)myMethod1: (id<proto>)32arg; // expected-note {{previous definition is here}}33@end34 35@implementation SomeClass236- (int)myMethod1: (id<NSObject>)37 arg { // expected-warning {{conflicting parameter types in implementation of 'myMethod1:': 'id<proto>' vs 'id<NSObject>'}}38 39}40@end41