Introduce SingleByteCoverage tests (w/yaml2obj) (#113114)
[llvm-project.git] / clang / test / Index / TestClassForwardDecl.m
blobb6735f5942637ac4ecfba3f6121fdd5796cced05
1 // RUN: c-index-test -write-pch %t.ast -arch x86_64 -mmacos-version-min=10.6 %s
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
4 // REQUIRES: x86-registered-target
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.
8 @class Foo;
10 void function(Foo * arg)
12     // nothing here.
15 // CHECK-scan: [1:1 - 8:1] Invalid Cursor => NoDeclFound
16 // CHECK-scan: [8:1 - 8:8] ObjCInterfaceDecl=Foo:8:8
17 // CHECK-scan: [8:8 - 8:11] ObjCClassRef=Foo:8:8
18 // CHECK-scan: [8:11 - 10:1] Invalid Cursor => NoDeclFound
19 // CHECK-scan: [10:1 - 10:15] FunctionDecl=function:10:6 (Definition)
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)
23 // CHECK: [11:1 - 13:2] CompundStmt=
39 // CHECK-load: TestClassForwardDecl.m:10:6: FunctionDecl=function:10:6 (Definition)
40 // CHECK-load: TestClassForwardDecl.m:10:21: ParmDecl=arg:10:21