summaryrefslogtreecommitdiffstats
path: root/test/CodeCompletion
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-04-16 02:51:46 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-04-16 02:51:46 +0000
commitb346d2f419ec7d7ce6b20780d518490338efa7de (patch)
treee21c370db7eec1ce8c8810d30b4c3ef7ddc56122 /test/CodeCompletion
parent0740a25e9be2dd98f44a73f58cade13b1f068c6e (diff)
Implement the all_lookups_iterator for PCH as a follow-up to r153970. This
includes a patch from Matthias Kleine with a regression testcase! Adds a new iterator 'data_iterator' to OnDiskHashTable which doesn't try to reconstruct the external_key from the internal_key, which is useful for traits that don't store enough information to do that mapping in their key. Also deletes the 'item_iterator' from OnDiskHashTable as dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeCompletion')
-rw-r--r--test/CodeCompletion/preamble.c7
-rw-r--r--test/CodeCompletion/some_struct.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeCompletion/preamble.c b/test/CodeCompletion/preamble.c
new file mode 100644
index 0000000000..98ad67976c
--- /dev/null
+++ b/test/CodeCompletion/preamble.c
@@ -0,0 +1,7 @@
+#include "some_struct.h"
+void foo() {
+ struct X x;
+ x.
+
+// RUN: CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:4:5 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
+// CHECK-CC1: FieldDecl:{ResultType int}{TypedText m} (35) (parent: StructDecl 'X')
diff --git a/test/CodeCompletion/some_struct.h b/test/CodeCompletion/some_struct.h
new file mode 100644
index 0000000000..63aa2a39d3
--- /dev/null
+++ b/test/CodeCompletion/some_struct.h
@@ -0,0 +1 @@
+struct X { int m; };