1// RUN: %clang_cc1 -fsyntax-only -Wmethod-signatures -verify -pedantic -Wno-objc-root-class %s 2typedef signed char BOOL; 3typedef int NSInteger; 4 5@class NSString; 6 7@protocol PBXCompletionItem 8- (NSString *) name; 9- (NSInteger)priority; 10@end 11 12extern NSInteger codeAssistantCaseCompareItems(id a, id b, void *context); 13 14NSInteger codeAssistantCaseCompareItems(id<PBXCompletionItem> a, id<PBXCompletionItem> b, void *context) 15{ 16 return 0; 17} 18 19@interface TedWantsToVerifyObjCDoesTheRightThing 20 21- compareThis:(int)a withThat:(id)b; // expected-note {{previous definition is here}} \ 22 // expected-note {{previous definition is here}} 23 24@end 25 26@implementation TedWantsToVerifyObjCDoesTheRightThing 27 28- compareThis:(id<PBXCompletionItem>) 29 a // expected-warning {{conflicting parameter types in implementation of 'compareThis:withThat:': 'int' vs 'id<PBXCompletionItem>'}} 30 withThat:(id<PBXCompletionItem>)b { // expected-warning {{conflicting parameter types in implementation of 'compareThis:withThat:': 'id' vs 'id<PBXCompletionItem>'}} 31 return self; 32} 33 34@end 35