Steve Naroff | 9dc22e6 | 2008-06-04 21:38:52 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify -pedantic %s |
Steve Naroff | 9734162 | 2008-06-04 15:07:33 +0000 | [diff] [blame] | 2 | typedef signed char BOOL; |
| 3 | typedef int NSInteger; |
| 4 | |
| 5 | @class NSString; |
| 6 | |
| 7 | @protocol PBXCompletionItem |
| 8 | - (NSString *) name; |
| 9 | - (NSInteger)priority; |
| 10 | @end |
| 11 | |
| 12 | extern NSInteger codeAssistantCaseCompareItems(id a, id b, void *context); |
| 13 | |
| 14 | NSInteger codeAssistantCaseCompareItems(id<PBXCompletionItem> a, id<PBXCompletionItem> b, void *context) |
| 15 | { |
| 16 | } |
Steve Naroff | 9dc22e6 | 2008-06-04 21:38:52 +0000 | [diff] [blame] | 17 | |
Steve Naroff | 9dc22e6 | 2008-06-04 21:38:52 +0000 | [diff] [blame] | 18 | @interface TedWantsToVerifyObjCDoesTheRightThing |
| 19 | |
Fariborz Jahanian | de73941 | 2008-12-05 01:35:25 +0000 | [diff] [blame] | 20 | - compareThis:(int)a withThat:(id)b; // expected-note {{previous definition is here}} |
Steve Naroff | 9dc22e6 | 2008-06-04 21:38:52 +0000 | [diff] [blame] | 21 | |
| 22 | @end |
| 23 | |
| 24 | @implementation TedWantsToVerifyObjCDoesTheRightThing |
| 25 | |
Fariborz Jahanian | 8daab97 | 2008-12-05 18:18:52 +0000 | [diff] [blame] | 26 | - compareThis:(id<PBXCompletionItem>)a withThat:(id<PBXCompletionItem>)b { // expected-warning {{conflicting types for 'compareThis:withThat:'}} |
Steve Naroff | 9dc22e6 | 2008-06-04 21:38:52 +0000 | [diff] [blame] | 27 | return self; |
| 28 | } |
| 29 | |
| 30 | @end |