diff options
Diffstat (limited to 'test/Index/index-decls.m')
-rw-r--r-- | test/Index/index-decls.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Index/index-decls.m b/test/Index/index-decls.m index 46d37c4..c6b14bb 100644 --- a/test/Index/index-decls.m +++ b/test/Index/index-decls.m @@ -26,6 +26,13 @@ __attribute__((something)) @interface I2 @end } @end +int test1() { + extern int extvar; + extvar = 2; + extern int extfn(); + return extfn(); +} + // RUN: c-index-test -index-file %s -target x86_64-apple-macosx10.7 > %t // RUN: FileCheck %s -input-file=%t // CHECK: [indexDeclaration]: kind: objc-class | name: I | {{.*}} | loc: 1:12 @@ -41,3 +48,9 @@ __attribute__((something)) @interface I2 @end // CHECK: [indexDeclaration]: kind: objc-ivar | name: _auto_prop | {{.*}} | loc: 20:33 // CHECK: [indexEntityReference]: kind: objc-ivar | name: _auto_prop | {{.*}} | loc: 25:3 + +// CHECK: [indexDeclaration]: kind: function | name: test1 | {{.*}} | loc: 29:5 +// CHECK: [indexDeclaration]: kind: variable | name: extvar | {{.*}} | loc: 30:14 +// CHECK: [indexEntityReference]: kind: variable | name: extvar | {{.*}} | loc: 31:3 +// CHECK: [indexDeclaration]: kind: function | name: extfn | {{.*}} | loc: 32:14 +// CHECK: [indexEntityReference]: kind: function | name: extfn | {{.*}} | loc: 33:10 |