2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
|
2009-11-18 10:02:52 +08:00
|
|
|
// RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=scan %s
|
|
|
|
// RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=load %s
|
|
|
|
|
|
|
|
// This test checks how the @class resolves as a cursor when the @interface is implicitly defined.
|
|
|
|
// See TestClassDecl.m for the corresponding test case. (<rdar://problem/7383421>)
|
|
|
|
|
|
|
|
@class Foo;
|
|
|
|
|
|
|
|
void function(Foo * arg)
|
|
|
|
{
|
|
|
|
// nothing here.
|
|
|
|
}
|
|
|
|
|
2010-02-14 16:32:51 +08:00
|
|
|
// CHECK-scan: [1:1 - 8:1] Invalid Cursor => NoDeclFound
|
2010-09-14 06:52:57 +08:00
|
|
|
// CHECK-scan: [8:1 - 8:8] UnexposedDecl=[8:8]
|
2010-02-14 16:32:51 +08:00
|
|
|
// CHECK-scan: [8:8 - 8:11] ObjCClassRef=Foo:8:8
|
2010-11-18 01:14:07 +08:00
|
|
|
// CHECK-scan: [8:11 - 10:1] Invalid Cursor => NoDeclFound
|
|
|
|
// CHECK-scan: [10:1 - 10:15] FunctionDecl=function:10:6 (Definition)
|
2010-02-14 16:32:51 +08:00
|
|
|
// CHECK-scan: [10:15 - 10:18] ObjCClassRef=Foo:8:8
|
|
|
|
// CHECK-scan: [10:18 - 10:24] ParmDecl=arg:10:21 (Definition)
|
|
|
|
// CHECK-scan: [10:24 - 11:1] FunctionDecl=function:10:6 (Definition)
|
|
|
|
// CHECK-scan: [11:1 - 13:2] UnexposedStmt=
|
2009-11-18 10:02:52 +08:00
|
|
|
|
2009-11-19 04:19:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-20 03:34:47 +08:00
|
|
|
// CHECK-load: TestClassForwardDecl.m:10:6: FunctionDecl=function:10:6 (Definition)
|
2010-01-19 04:23:29 +08:00
|
|
|
// CHECK-load: TestClassForwardDecl.m:10:21: ParmDecl=arg:10:21
|
2009-11-18 10:02:52 +08:00
|
|
|
|