aboutsummaryrefslogtreecommitdiff
path: root/test/Index/get-cursor.m
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-30 00:19:05 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-30 00:19:05 +0000
commit66373dd2d508407ed5894ad65f654eea8d892319 (patch)
treecea73051005449ba4de8837074cc40dd08acb9f0 /test/Index/get-cursor.m
parent1ef28dbcf1a8b72f590f2d73bc204e85605ab605 (diff)
[libclang] Have c-index-test output more information about a cursor with -cursor-at:
-the location of the cursor -its extent -its spelling Part of radar://11113120 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/get-cursor.m')
-rw-r--r--test/Index/get-cursor.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Index/get-cursor.m b/test/Index/get-cursor.m
index e1329a4b5e..830f9828b9 100644
--- a/test/Index/get-cursor.m
+++ b/test/Index/get-cursor.m
@@ -31,10 +31,11 @@
@implementation rdar10902015
-struct S {};
+struct S { int x; };
-(void)mm:(struct S*)s {
rdar10902015 *i = 0;
+ s->x = 0;
}
@end
@@ -46,7 +47,10 @@ struct S {};
// CHECK-WITH-WEAK: ObjCClassRef=Foo:8:8
// RUN: c-index-test -cursor-at=%s:20:10 %s | FileCheck -check-prefix=CHECK-METHOD %s
-// CHECK-METHOD: ObjCInstanceMethodDecl=name:20:7
+// CHECK-METHOD: 20:7 ObjCInstanceMethodDecl=name:20:7 Extent=[20:1 - 20:12]
// RUN: c-index-test -cursor-at=%s:37:17 %s | FileCheck -check-prefix=CHECK-IN-IMPL %s
// CHECK-IN-IMPL: VarDecl=i:37:17
+
+// RUN: c-index-test -cursor-at=%s:38:6 -cursor-at=%s:40:11 %s | FileCheck -check-prefix=CHECK-MEMBERREF %s
+// CHECK-MEMBERREF: 38:6 MemberRefExpr=x:34:16 SingleRefName=[38:6 - 38:7] RefName=[38:6 - 38:7] Extent=[38:3 - 38:7]