35 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -Wmethod-signatures -verify -pedantic -Wno-objc-root-class %s2typedef signed char BOOL;3typedef int NSInteger;4 5@class NSString;6 7@protocol PBXCompletionItem8- (NSString *) name;9- (NSInteger)priority;10@end11 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 TedWantsToVerifyObjCDoesTheRightThing20 21- compareThis:(int)a withThat:(id)b; // expected-note {{previous definition is here}} \22 // expected-note {{previous definition is here}}23 24@end25 26@implementation TedWantsToVerifyObjCDoesTheRightThing27 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@end35