aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-10 22:58:04 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-10 22:58:04 +0000
commit3bed3d196dbb5ad2ea7442da4b6c2fbf6bb5fcc6 (patch)
tree5c363089c186d5caac88a271f9d3af229b574817 /test
parent57330eed3fbe530cb05996e4a346cc5fc217c0d9 (diff)
[libclang] Do index 'extern' declarations inside functions.
rdar://12257073 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Index/index-decls.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Index/index-decls.m b/test/Index/index-decls.m
index 46d37c4345..c6b14bb8fd 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