blob: 4abc9fdddbd862d73b0a9ba1478a6cf24031ac85 [file] [log] [blame]
Steve Naroff9dc22e62008-06-04 21:38:52 +00001// RUN: clang -fsyntax-only -verify -pedantic %s
Steve Naroff97341622008-06-04 15:07:33 +00002typedef 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}
Steve Naroff9dc22e62008-06-04 21:38:52 +000017
Steve Naroff9dc22e62008-06-04 21:38:52 +000018@interface TedWantsToVerifyObjCDoesTheRightThing
19
Fariborz Jahaniande739412008-12-05 01:35:25 +000020- compareThis:(int)a withThat:(id)b; // expected-note {{previous definition is here}}
Steve Naroff9dc22e62008-06-04 21:38:52 +000021
22@end
23
24@implementation TedWantsToVerifyObjCDoesTheRightThing
25
Fariborz Jahanian8daab972008-12-05 18:18:52 +000026- compareThis:(id<PBXCompletionItem>)a withThat:(id<PBXCompletionItem>)b { // expected-warning {{conflicting types for 'compareThis:withThat:'}}
Steve Naroff9dc22e62008-06-04 21:38:52 +000027 return self;
28}
29
30@end