diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
commit | be1de4be954c80875ad4108e0a33e8e131b2f2c0 (patch) | |
tree | 1fbbecf276bf7c7bdcbb4dd446099d6d90eaa516 /clang/test/Index/local-symbols.m | |
parent | c4626a62754862d20b41e8a46a3574264ea80e6d (diff) | |
parent | f1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff) |
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/test/Index/local-symbols.m')
-rw-r--r-- | clang/test/Index/local-symbols.m | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/clang/test/Index/local-symbols.m b/clang/test/Index/local-symbols.m new file mode 100644 index 0000000..b4eb262 --- /dev/null +++ b/clang/test/Index/local-symbols.m @@ -0,0 +1,44 @@ +// RUN: c-index-test -test-load-source local %s | FileCheck %s + +// From: <rdar://problem/7568881> +// The method 'bar' was also being reported outside the @implementation + +@interface Foo { + id x; +} +- (id) bar; +@end + +@implementation Foo +- (id) bar { + return 0; +} +@end + +// From: <rdar://problem/8380046> + +@protocol Prot8380046 +@end + +@interface R8380046 +@end + +@interface R8380046 () <Prot8380046> +@end + +// CHECK: local-symbols.m:6:12: ObjCInterfaceDecl=Foo:6:12 Extent=[6:1 - 10:5] +// CHECK: local-symbols.m:7:6: ObjCIvarDecl=x:7:6 (Definition) Extent=[7:3 - 7:7] +// CHECK: local-symbols.m:7:3: TypeRef=id:0:0 Extent=[7:3 - 7:5] +// CHECK: local-symbols.m:9:8: ObjCInstanceMethodDecl=bar:9:8 Extent=[9:1 - 9:12] +// CHECK: local-symbols.m:9:4: TypeRef=id:0:0 Extent=[9:4 - 9:6] +// CHECK: local-symbols.m:12:17: ObjCImplementationDecl=Foo:12:17 (Definition) Extent=[12:1 - 16:2] +// CHECK: local-symbols.m:13:8: ObjCInstanceMethodDecl=bar:13:8 (Definition) Extent=[13:1 - 15:2] +// CHECK: local-symbols.m:13:4: TypeRef=id:0:0 Extent=[13:4 - 13:6] +// CHECK: local-symbols.m:14:10: UnexposedExpr= Extent=[14:10 - 14:11] +// CHECK: local-symbols.m:14:10: IntegerLiteral= Extent=[14:10 - 14:11] +// CHECK: local-symbols.m:20:11: ObjCProtocolDecl=Prot8380046:20:11 (Definition) Extent=[20:1 - 21:5] +// CHECK: local-symbols.m:23:12: ObjCInterfaceDecl=R8380046:23:12 Extent=[23:1 - 24:5] +// CHECK: local-symbols.m:26:12: ObjCCategoryDecl=:26:12 Extent=[26:1 - 27:5] +// CHECK: local-symbols.m:26:12: ObjCClassRef=R8380046:23:12 Extent=[26:12 - 26:20] +// CHECK: local-symbols.m:26:25: ObjCProtocolRef=Prot8380046:20:11 Extent=[26:25 - 26:36] + |