1f4a2713aSLionel Sambuc// RUN: c-index-test -test-load-source local %s | FileCheck %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc// From: <rdar://problem/7568881> 4f4a2713aSLionel Sambuc// The method 'bar' was also being reported outside the @implementation 5f4a2713aSLionel Sambuc 6f4a2713aSLionel Sambuc@interface Foo { 7f4a2713aSLionel Sambuc id x; 8f4a2713aSLionel Sambuc} 9f4a2713aSLionel Sambuc- (id) bar; 10f4a2713aSLionel Sambuc@end 11f4a2713aSLionel Sambuc 12f4a2713aSLionel Sambuc@implementation Foo 13f4a2713aSLionel Sambuc- (id) bar { 14f4a2713aSLionel Sambuc return 0; 15f4a2713aSLionel Sambuc} 16f4a2713aSLionel Sambuc@end 17f4a2713aSLionel Sambuc 18f4a2713aSLionel Sambuc// From: <rdar://problem/8380046> 19f4a2713aSLionel Sambuc 20f4a2713aSLionel Sambuc@protocol Prot8380046 21f4a2713aSLionel Sambuc@end 22f4a2713aSLionel Sambuc 23f4a2713aSLionel Sambuc@interface R8380046 24f4a2713aSLionel Sambuc@end 25f4a2713aSLionel Sambuc 26f4a2713aSLionel Sambuc@interface R8380046 () <Prot8380046> 27f4a2713aSLionel Sambuc@end 28f4a2713aSLionel Sambuc 29*0a6a1f1dSLionel Sambuc@class NSString; 30*0a6a1f1dSLionel Sambuc 31*0a6a1f1dSLionel Sambucvoid test() { 32*0a6a1f1dSLionel Sambuc NSString *s = @"objc str"; 33*0a6a1f1dSLionel Sambuc} 34*0a6a1f1dSLionel Sambuc 35f4a2713aSLionel Sambuc// CHECK: local-symbols.m:6:12: ObjCInterfaceDecl=Foo:6:12 Extent=[6:1 - 10:5] 36f4a2713aSLionel Sambuc// CHECK: local-symbols.m:7:6: ObjCIvarDecl=x:7:6 (Definition) Extent=[7:3 - 7:7] 37f4a2713aSLionel Sambuc// CHECK: local-symbols.m:7:3: TypeRef=id:0:0 Extent=[7:3 - 7:5] 38f4a2713aSLionel Sambuc// CHECK: local-symbols.m:9:8: ObjCInstanceMethodDecl=bar:9:8 Extent=[9:1 - 9:12] 39f4a2713aSLionel Sambuc// CHECK: local-symbols.m:9:4: TypeRef=id:0:0 Extent=[9:4 - 9:6] 40f4a2713aSLionel Sambuc// CHECK: local-symbols.m:12:17: ObjCImplementationDecl=Foo:12:17 (Definition) Extent=[12:1 - 16:2] 41f4a2713aSLionel Sambuc// CHECK: local-symbols.m:13:8: ObjCInstanceMethodDecl=bar:13:8 (Definition) Extent=[13:1 - 15:2] 42f4a2713aSLionel Sambuc// CHECK: local-symbols.m:13:4: TypeRef=id:0:0 Extent=[13:4 - 13:6] 43f4a2713aSLionel Sambuc// CHECK: local-symbols.m:14:10: UnexposedExpr= Extent=[14:10 - 14:11] 44f4a2713aSLionel Sambuc// CHECK: local-symbols.m:14:10: IntegerLiteral= Extent=[14:10 - 14:11] 45f4a2713aSLionel Sambuc// CHECK: local-symbols.m:20:11: ObjCProtocolDecl=Prot8380046:20:11 (Definition) Extent=[20:1 - 21:5] 46f4a2713aSLionel Sambuc// CHECK: local-symbols.m:23:12: ObjCInterfaceDecl=R8380046:23:12 Extent=[23:1 - 24:5] 47f4a2713aSLionel Sambuc// CHECK: local-symbols.m:26:12: ObjCCategoryDecl=:26:12 Extent=[26:1 - 27:5] 48f4a2713aSLionel Sambuc// CHECK: local-symbols.m:26:12: ObjCClassRef=R8380046:23:12 Extent=[26:12 - 26:20] 49f4a2713aSLionel Sambuc// CHECK: local-symbols.m:26:25: ObjCProtocolRef=Prot8380046:20:11 Extent=[26:25 - 26:36] 50f4a2713aSLionel Sambuc 51*0a6a1f1dSLionel Sambuc// CHECK: local-symbols.m:32:17: ObjCStringLiteral="objc str" Extent=[32:17 - 32:28] 52