Allow resolving headers from a PCH even after headers+PCH were moved to another path.
[clang.git] / test / SemaObjC / comptypes-a.m
blob8480f524dc72c77e1219ac36217da2d9ecd2974f
1 // RUN: %clang_cc1 -fsyntax-only -Wmethod-signatures -verify -pedantic %s
2 typedef signed char BOOL;
3 typedef int NSInteger;
5 @class NSString;
7 @protocol PBXCompletionItem
8 - (NSString *) name;
9 - (NSInteger)priority;
10 @end
12 extern NSInteger codeAssistantCaseCompareItems(id a, id b, void *context);
14 NSInteger codeAssistantCaseCompareItems(id<PBXCompletionItem> a, id<PBXCompletionItem> b, void *context)
16   return 0;
19 @interface TedWantsToVerifyObjCDoesTheRightThing
21 - compareThis:(int)a withThat:(id)b;  // expected-note {{previous definition is here}} \
22                                       // expected-note {{previous definition is here}}
24 @end
26 @implementation TedWantsToVerifyObjCDoesTheRightThing
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;
34 @end