summaryrefslogtreecommitdiff
path: root/test/Index/cindex-from-source.m
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
commit34d02d0b37f16015f317a935c48ce8b7b64ae77b (patch)
tree2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/Index/cindex-from-source.m
parent1569ce68681d909594d64f9b056d71f5dd7563bf (diff)
Notes
Diffstat (limited to 'test/Index/cindex-from-source.m')
-rw-r--r--test/Index/cindex-from-source.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Index/cindex-from-source.m b/test/Index/cindex-from-source.m
new file mode 100644
index 000000000000..8d6a1de4bbdc
--- /dev/null
+++ b/test/Index/cindex-from-source.m
@@ -0,0 +1,9 @@
+// RUN: echo 'typedef int t0;' > %t.pfx.h
+// RUN: clang -x objective-c-header %t.pfx.h -o %t.pfx.h.gch
+// RUN: c-index-test -test-load-source local %s -include %t.pfx.h > %t
+// RUN: FileCheck %s < %t
+// CHECK: cindex-from-source.m:{{.*}}:{{.*}}: StructDecl=s0:{{.*}}:{{.*}} [Context=cindex-from-source.m]
+// CHECK: cindex-from-source.m:{{.*}}:{{.*}}: VarDecl=g0:{{.*}}:{{.*}} [Context=cindex-from-source.m]
+
+struct s0 {};
+t0 g0;