Argyrios Kyrtzidis | 09b9f0e | 2015-08-05 17:52:57 +0000 | [diff] [blame] | 1 | // RUN: c-index-test -write-pch %t.ast -arch x86_64 -mmacosx-version-min=10.6 %s |
Tim Northover | 19ae117 | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 2 | // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=CHECK-scan %s |
| 3 | // RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=CHECK-load %s |
Adrian Prantl | bc06858 | 2015-07-08 01:00:30 +0000 | [diff] [blame] | 4 | // REQUIRES: x86-registered-target |
Ted Kremenek | 0469b7e | 2009-11-18 02:02:52 +0000 | [diff] [blame] | 5 | // This test checks how the @class resolves as a cursor when the @interface is implicitly defined. |
| 6 | // See TestClassDecl.m for the corresponding test case. (<rdar://problem/7383421>) |
| 7 | |
| 8 | @class Foo; |
| 9 | |
| 10 | void function(Foo * arg) |
| 11 | { |
| 12 | // nothing here. |
| 13 | } |
| 14 | |
Daniel Dunbar | 6092d50 | 2010-02-14 08:32:51 +0000 | [diff] [blame] | 15 | // CHECK-scan: [1:1 - 8:1] Invalid Cursor => NoDeclFound |
Argyrios Kyrtzidis | 3698cef | 2012-01-24 21:39:26 +0000 | [diff] [blame] | 16 | // CHECK-scan: [8:1 - 8:8] ObjCInterfaceDecl=Foo:8:8 |
Daniel Dunbar | 6092d50 | 2010-02-14 08:32:51 +0000 | [diff] [blame] | 17 | // CHECK-scan: [8:8 - 8:11] ObjCClassRef=Foo:8:8 |
Douglas Gregor | 29ee422 | 2010-11-17 17:14:07 +0000 | [diff] [blame] | 18 | // CHECK-scan: [8:11 - 10:1] Invalid Cursor => NoDeclFound |
| 19 | // CHECK-scan: [10:1 - 10:15] FunctionDecl=function:10:6 (Definition) |
Daniel Dunbar | 6092d50 | 2010-02-14 08:32:51 +0000 | [diff] [blame] | 20 | // CHECK-scan: [10:15 - 10:18] ObjCClassRef=Foo:8:8 |
| 21 | // CHECK-scan: [10:18 - 10:24] ParmDecl=arg:10:21 (Definition) |
| 22 | // CHECK-scan: [10:24 - 11:1] FunctionDecl=function:10:6 (Definition) |
Douglas Gregor | 4c362d5 | 2011-10-05 19:00:14 +0000 | [diff] [blame] | 23 | // CHECK: [11:1 - 13:2] CompundStmt= |
Ted Kremenek | 0469b7e | 2009-11-18 02:02:52 +0000 | [diff] [blame] | 24 | |
Daniel Dunbar | 9b33352 | 2009-11-18 20:19:44 +0000 | [diff] [blame] | 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
Douglas Gregor | 6b8232f | 2010-01-19 19:34:47 +0000 | [diff] [blame] | 39 | // CHECK-load: TestClassForwardDecl.m:10:6: FunctionDecl=function:10:6 (Definition) |
Ted Kremenek | 473c7a7 | 2010-01-18 20:23:29 +0000 | [diff] [blame] | 40 | // CHECK-load: TestClassForwardDecl.m:10:21: ParmDecl=arg:10:21 |
Ted Kremenek | 0469b7e | 2009-11-18 02:02:52 +0000 | [diff] [blame] | 41 | |