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
diff --git a/test/CodeCompletion/preamble.c b/test/CodeCompletion/preamble.c
new file mode 100644
index 0000000..98ad679
--- /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 0000000..63aa2a3
--- /dev/null
+++ b/test/CodeCompletion/some_struct.h
@@ -0,0 +1 @@
+struct X { int m; };