blob: b9f4fe2aeabc0afcb1d2a75232e6d2c65231f3e9 [file] [log] [blame]
Ted Kremenekda5a4282010-05-03 20:16:35 +00001// RUN: c-index-test -test-load-source local %s | FileCheck %s
2
3// From: <rdar://problem/7568881>
4// The method 'bar' was also being reported outside the @implementation
5
6@interface Foo {
7 id x;
8}
9- (id) bar;
10@end
11
12@implementation Foo
13- (id) bar {
14 return 0;
15}
16@end
17
Ted Kremenek53b94412010-09-01 01:21:15 +000018// From: <rdar://problem/8380046>
19
20@protocol Prot8380046
21@end
22
23@interface R8380046
24@end
25
26@interface R8380046 () <Prot8380046>
27@end
28
Ted Kremenekda5a4282010-05-03 20:16:35 +000029// CHECK: local-symbols.m:6:12: ObjCInterfaceDecl=Foo:6:12 Extent=[6:1 - 10:5]
30// CHECK: local-symbols.m:7:6: ObjCIvarDecl=x:7:6 (Definition) Extent=[7:6 - 7:7]
31// CHECK: local-symbols.m:7:3: TypeRef=id:0:0 Extent=[7:3 - 7:5]
32// CHECK: local-symbols.m:9:1: ObjCInstanceMethodDecl=bar:9:1 Extent=[9:1 - 9:12]
33// CHECK: local-symbols.m:9:4: TypeRef=id:0:0 Extent=[9:4 - 9:6]
34// CHECK: local-symbols.m:12:1: ObjCImplementationDecl=Foo:12:1 (Definition) Extent=[12:1 - 16:2]
35// CHECK: local-symbols.m:13:1: ObjCInstanceMethodDecl=bar:13:1 (Definition) Extent=[13:1 - 15:2]
36// CHECK: local-symbols.m:13:4: TypeRef=id:0:0 Extent=[13:4 - 13:6]
Ted Kremenek53b94412010-09-01 01:21:15 +000037// CHECK: local-symbols.m:14:10: UnexposedExpr= Extent=[14:10 - 14:11]
38// CHECK: local-symbols.m:14:10: UnexposedExpr= Extent=[14:10 - 14:11]
39// CHECK: local-symbols.m:20:1: ObjCProtocolDecl=Prot8380046:20:1 (Definition) Extent=[20:1 - 21:5]
40// CHECK: local-symbols.m:23:12: ObjCInterfaceDecl=R8380046:23:12 Extent=[23:1 - 24:5]
41// CHECK: local-symbols.m:26:12: ObjCCategoryDecl=:26:12 Extent=[26:1 - 27:5]
42// CHECK: local-symbols.m:26:12: ObjCClassRef=R8380046:23:12 Extent=[26:12 - 26:20]
43// CHECK: local-symbols.m:26:25: ObjCProtocolRef=Prot8380046:20:1 Extent=[26:25 - 26:36]
Ted Kremenekda5a4282010-05-03 20:16:35 +000044