diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-16 17:14:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-16 17:14:40 +0000 |
commit | 46d66143886be0c4b486f8112def441c90e5468a (patch) | |
tree | ca96e2e750af872c589968db67835465b00c8bf1 /clang/test | |
parent | 071676f42240cc06cb404f53d8f53c90b45fbc66 (diff) | |
download | bcm5719-llvm-46d66143886be0c4b486f8112def441c90e5468a.tar.gz bcm5719-llvm-46d66143886be0c4b486f8112def441c90e5468a.zip |
Give ObjCClassRef cursors a sane representation, which is encapsulated
in CXCursor.cpp. With this sane representation, fix the class
reference that is part of Objective-C category declarations so that
the cursor's location matches up with the reference, not the class
being referred to.
llvm-svn: 93640
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Index/TestClassDecl.m | 4 | ||||
-rw-r--r-- | clang/test/Index/TestClassForwardDecl.m | 2 | ||||
-rw-r--r-- | clang/test/Index/c-index-api-fn-scan.m | 6 | ||||
-rw-r--r-- | clang/test/Index/c-index-api-loadTU-test.m | 6 | ||||
-rw-r--r-- | clang/test/Index/c-index-getCursor-test.m | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/clang/test/Index/TestClassDecl.m b/clang/test/Index/TestClassDecl.m index 0ec5c75af57..9737ec213fb 100644 --- a/clang/test/Index/TestClassDecl.m +++ b/clang/test/Index/TestClassDecl.m @@ -17,14 +17,14 @@ void function(Foo * arg) // CHECK-scan: {start_line=1 start_col=1 end_line=7 end_col=1} Invalid Cursor => NoDeclFound // CHECK-scan: {start_line=8 start_col=1 end_line=8 end_col=7} Invalid Cursor => NotImplemented -// CHECK-scan: {start_line=8 start_col=8 end_line=8 end_col=10} ObjCClassRef=Foo:8:1 +// CHECK-scan: {start_line=8 start_col=8 end_line=8 end_col=10} ObjCClassRef=Foo:10:1 // CHECK-scan: {start_line=8 start_col=11 end_line=9 end_col=1} Invalid Cursor => NoDeclFound // CHECK-scan: {start_line=10 start_col=1 end_line=11 end_col=4} ObjCInterfaceDecl=Foo:10:1 // CHECK-scan: {start_line=11 start_col=5 end_line=12 end_col=1} Invalid Cursor => NoDeclFound // CHECK-scan: {start_line=13 start_col=1 end_line=13 end_col=4} FunctionDefn=function:13:6 // CHECK-scan: {start_line=13 start_col=5 end_line=13 end_col=5} Invalid Cursor => NoDeclFound // CHECK-scan: {start_line=13 start_col=6 end_line=13 end_col=14} FunctionDefn=function:13:6 -// CHECK-scan: {start_line=13 start_col=15 end_line=13 end_col=17} ObjCClassRef=Foo:13:21 +// CHECK-scan: {start_line=13 start_col=15 end_line=13 end_col=17} ObjCClassRef=Foo:10:1 // CHECK-scan: {start_line=13 start_col=18 end_line=13 end_col=18} FunctionDefn=function:13:6 // CHECK-scan: {start_line=13 start_col=19 end_line=13 end_col=19} ParmDecl=arg:13:21 // CHECK-scan: {start_line=13 start_col=20 end_line=13 end_col=20} FunctionDefn=function:13:6 diff --git a/clang/test/Index/TestClassForwardDecl.m b/clang/test/Index/TestClassForwardDecl.m index 8bb437ca6f5..76c0b6cffa1 100644 --- a/clang/test/Index/TestClassForwardDecl.m +++ b/clang/test/Index/TestClassForwardDecl.m @@ -19,7 +19,7 @@ void function(Foo * arg) // CHECK-scan: {start_line=10 start_col=1 end_line=10 end_col=4} FunctionDefn=function:10:6 // CHECK-scan: {start_line=10 start_col=5 end_line=10 end_col=5} Invalid Cursor => NoDeclFound // CHECK-scan: {start_line=10 start_col=6 end_line=10 end_col=14} FunctionDefn=function:10:6 -// CHECK-scan: {start_line=10 start_col=15 end_line=10 end_col=17} ObjCClassRef=Foo:10:21 +// CHECK-scan: {start_line=10 start_col=15 end_line=10 end_col=17} ObjCClassRef=Foo:8:1 // CHECK-scan: {start_line=10 start_col=18 end_line=10 end_col=18} FunctionDefn=function:10:6 // CHECK-scan: {start_line=10 start_col=19 end_line=10 end_col=19} ParmDecl=arg:10:21 // CHECK-scan: {start_line=10 start_col=20 end_line=10 end_col=20} FunctionDefn=function:10:6 diff --git a/clang/test/Index/c-index-api-fn-scan.m b/clang/test/Index/c-index-api-fn-scan.m index 3db836ffaeb..b0728ec90bc 100644 --- a/clang/test/Index/c-index-api-fn-scan.m +++ b/clang/test/Index/c-index-api-fn-scan.m @@ -91,9 +91,9 @@ int main (int argc, const char * argv[]) { main(someEnum, (const char **)bee); } -// CHECK: c-index-api-fn-scan.m:84:2: ObjCClassRef=Baz:84:8 [Context:Baz] -// CHECK: c-index-api-fn-scan.m:84:3: ObjCClassRef=Baz:84:8 [Context:Baz] -// CHECK: c-index-api-fn-scan.m:84:4: ObjCClassRef=Baz:84:8 [Context:Baz] +// CHECK: c-index-api-fn-scan.m:84:2: ObjCClassRef=Baz:48:1 [Context:Baz] +// CHECK: c-index-api-fn-scan.m:84:3: ObjCClassRef=Baz:48:1 [Context:Baz] +// CHECK: c-index-api-fn-scan.m:84:4: ObjCClassRef=Baz:48:1 [Context:Baz] // CHECK: c-index-api-fn-scan.m:84:6: VarDecl=bee:84:8 [Context:bee] // CHECK: c-index-api-fn-scan.m:84:8: VarDecl=bee:84:8 [Context:bee] // CHECK: c-index-api-fn-scan.m:84:9: VarDecl=bee:84:8 [Context:bee] diff --git a/clang/test/Index/c-index-api-loadTU-test.m b/clang/test/Index/c-index-api-loadTU-test.m index 7ab435fa859..62485430b02 100644 --- a/clang/test/Index/c-index-api-loadTU-test.m +++ b/clang/test/Index/c-index-api-loadTU-test.m @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast // RUN: c-index-test -test-load-tu %t.ast all | FileCheck %s -// XFAIL: * + @interface Foo { } @@ -58,8 +58,8 @@ int main (int argc, const char * argv[]) { // CHECK: c-index-api-loadTU-test.m:9:1: ObjCClassMethodDecl=fooC:9:1 [Context=Foo] [Extent=9:1:9:7] // CHECK: c-index-api-loadTU-test.m:13:12: ObjCInterfaceDecl=Bar:13:1 [Context=c-index-api-loadTU-test.m] [Extent=13:1:17:4] // CHECK: c-index-api-loadTU-test.m:13:18: ObjCSuperClassRef=Foo:4:1 [Context=Bar] [Extent=4:1:11:4] -// CHECK: c-index-api-loadTU-test.m:19:1: ObjCCategoryDecl=FooCat:19:1 [Context=c-index-api-loadTU-test.m] [Extent=19:1:22:4] -// CHECK: c-index-api-loadTU-test.m:4:1: ObjCClassRef=Foo:19:1 [Context=FooCat] [Extent=19:1:22:4] +// CHECK: c-index-api-loadTU-test.m:19:12: ObjCCategoryDecl=FooCat:19:12 [Context=c-index-api-loadTU-test.m] [Extent=19:1:22:4] +// CHECK: c-index-api-loadTU-test.m:19:12: ObjCClassRef=Foo:4:1 [Context=FooCat] [Extent=4:1:11:4] // CHECK: c-index-api-loadTU-test.m:20:1: ObjCInstanceMethodDecl=catMethodWithFloat::20:1 [Context=FooCat] [Extent=20:1:20:40] // CHECK: c-index-api-loadTU-test.m:21:1: ObjCInstanceMethodDecl=floatMethod:21:1 [Context=FooCat] [Extent=21:1:21:22] // CHECK: c-index-api-loadTU-test.m:24:1: ObjCProtocolDecl=Proto:24:1 [Context=c-index-api-loadTU-test.m] [Extent=24:1:26:4] diff --git a/clang/test/Index/c-index-getCursor-test.m b/clang/test/Index/c-index-getCursor-test.m index 10f905fa3f8..7ea996f76c7 100644 --- a/clang/test/Index/c-index-getCursor-test.m +++ b/clang/test/Index/c-index-getCursor-test.m @@ -104,7 +104,7 @@ int main (int argc, const char * argv[]) { // CHECK: {start_line=44 start_col=33 end_line=44 end_col=33} FunctionDefn=main:44:5 // CHECK: {start_line=44 start_col=34 end_line=44 end_col=39} ParmDecl=argv:44:34 // CHECK: {start_line=44 start_col=40 end_line=45 end_col=1} FunctionDefn=main:44:5 -// CHECK: {start_line=45 start_col=2 end_line=45 end_col=4} ObjCClassRef=Baz:45:8 +// CHECK: {start_line=45 start_col=2 end_line=45 end_col=4} ObjCClassRef=Baz:31:1 // CHECK: {start_line=45 start_col=5 end_line=45 end_col=5} FunctionDefn=main:44:5 // CHECK: {start_line=45 start_col=6 end_line=45 end_col=6} VarDecl=bee:45:8 // CHECK: {start_line=45 start_col=7 end_line=45 end_col=7} FunctionDefn=main:44:5 |