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/overrides.m | |
parent | c4626a62754862d20b41e8a46a3574264ea80e6d (diff) | |
parent | f1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff) |
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/test/Index/overrides.m')
-rw-r--r-- | clang/test/Index/overrides.m | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/clang/test/Index/overrides.m b/clang/test/Index/overrides.m new file mode 100644 index 0000000..6908754 --- /dev/null +++ b/clang/test/Index/overrides.m @@ -0,0 +1,61 @@ + +@protocol P1 +- (void)protoMethod; +- (void)protoMethodWithParam:(int)param; +@end + +@protocol P3 +- (void)protoMethod; +@end + +@protocol P2 <P1> +- (void)protoMethod; +@end + +@interface A +- (void)method; +- (void)protoMethod; ++ (void)methodWithParam:(int)param; +@end + +@interface B : A <P2, P3> +- (void)method; +- (void)protoMethod; +@end + +@implementation B +- (void)method { } ++ (void)methodWithParam:(int)param { } +@end + +@protocol P4 <P3> +- (void)protoMethod; +@end + +@interface B(cat) <P4> +- (void)protoMethod; +@end + +@interface B2 +@end + +@interface B2(cat) +-(void)meth; +@end + +@interface I2 : B2 +@end + +@implementation I2 +-(void)meth { } +@end + +// RUN: c-index-test -test-load-source local %s | FileCheck %s +// CHECK: overrides.m:12:9: ObjCInstanceMethodDecl=protoMethod:12:9 [Overrides @3:9] +// CHECK: overrides.m:22:9: ObjCInstanceMethodDecl=method:22:9 [Overrides @16:9] +// CHECK: overrides.m:23:9: ObjCInstanceMethodDecl=protoMethod:23:9 [Overrides @12:9, @8:9, @32:9, @17:9] +// CHECK: overrides.m:27:9: ObjCInstanceMethodDecl=method:27:9 (Definition) [Overrides @16:9] +// CHECK: overrides.m:28:9: ObjCClassMethodDecl=methodWithParam::28:9 (Definition) [Overrides @18:9] +// CHECK: overrides.m:32:9: ObjCInstanceMethodDecl=protoMethod:32:9 [Overrides @8:9] +// CHECK: overrides.m:36:9: ObjCInstanceMethodDecl=protoMethod:36:9 [Overrides @12:9, @8:9, @32:9, @17:9] +// CHECK: overrides.m:50:8: ObjCInstanceMethodDecl=meth:50:8 (Definition) [Overrides @43:8] |