diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/Index/Core/index-source.m | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
Diffstat (limited to 'test/Index/Core/index-source.m')
-rw-r--r-- | test/Index/Core/index-source.m | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/Index/Core/index-source.m b/test/Index/Core/index-source.m index 2931e664eac6a..ed616dbc9ae6e 100644 --- a/test/Index/Core/index-source.m +++ b/test/Index/Core/index-source.m @@ -2,7 +2,7 @@ // RUN: c-index-test core -print-source-symbols -include-locals -- %s -target x86_64-apple-macosx10.7 | FileCheck -check-prefix=LOCAL %s @interface Base -// CHECK: [[@LINE-1]]:12 | class/ObjC | Base | c:objc(cs)Base | _OBJC_CLASS_$_Base | Decl | rel: 0 +// CHECK: [[@LINE-1]]:12 | class/ObjC | Base | [[BASE_USR:.*]] | _OBJC_CLASS_$_Base | Decl | rel: 0 -(void)meth; // CHECK: [[@LINE-1]]:8 | instance-method/ObjC | meth | c:objc(cs)Base(im)meth | -[Base meth] | Decl,Dyn,RelChild | rel: 1 // CHECK-NEXT: RelChild | Base | c:objc(cs)Base @@ -60,7 +60,7 @@ void goo(Base *b) { Base *f = (Base *) 2; } -// CHECK: [[@LINE+1]]:11 | protocol/ObjC | Prot1 | c:objc(pl)Prot1 | <no-cgname> | Decl | rel: 0 +// CHECK: [[@LINE+1]]:11 | protocol/ObjC | Prot1 | [[PROT1_USR:.*]] | <no-cgname> | Decl | rel: 0 @protocol Prot1 @end @@ -472,3 +472,21 @@ void testImplicitProperties(ImplicitProperties *c) { } @end + +@protocol Prot3 // CHECK: [[@LINE]]:11 | protocol/ObjC | Prot3 | [[PROT3_USR:.*]] | <no-cgname> | Decl | +-(void)meth; // CHECK: [[@LINE]]:8 | instance-method(protocol)/ObjC | meth | [[PROT3_meth_USR:.*]] | -[Prot3 meth] | Decl,Dyn,RelChild | +@end + +void test_rec1() { + id<Prot3, Prot1> o1; + [o1 meth]; // CHECK: [[@LINE]]:7 | instance-method(protocol)/ObjC | meth | [[PROT3_meth_USR]] | {{.*}} | Ref,Call,Dyn,RelRec,RelCall,RelCont | rel: 3 + // CHECK-NEXT: RelCall,RelCont | test_rec1 | + // CHECK-NEXT: RelRec | Prot3 | [[PROT3_USR]] + // CHECK-NEXT: RelRec | Prot1 | [[PROT1_USR]] + Base<Prot3, Prot1> *o2; + [o2 meth]; // CHECK: [[@LINE]]:7 | instance-method/ObjC | meth | {{.*}} | Ref,Call,Dyn,RelRec,RelCall,RelCont | rel: 4 + // CHECK-NEXT: RelCall,RelCont | test_rec1 | + // CHECK-NEXT: RelRec | Base | [[BASE_USR]] + // CHECK-NEXT: RelRec | Prot3 | [[PROT3_USR]] + // CHECK-NEXT: RelRec | Prot1 | [[PROT1_USR]] +} |