summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/preamble.c
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
commit2bd0ab2b11e173aa970bb531cf98750d7ee72287 (patch)
treed1a444b68d1319ba3e17a7bd7565d014c180665d /clang/test/CodeCompletion/preamble.c
parentccc7e42b1f190676f9b42edf202e6da0a7f364b9 (diff)
downloadbcm5719-llvm-2bd0ab2b11e173aa970bb531cf98750d7ee72287.tar.gz
bcm5719-llvm-2bd0ab2b11e173aa970bb531cf98750d7ee72287.zip
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. llvm-svn: 154784
Diffstat (limited to 'clang/test/CodeCompletion/preamble.c')
-rw-r--r--clang/test/CodeCompletion/preamble.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/preamble.c b/clang/test/CodeCompletion/preamble.c
new file mode 100644
index 00000000000..98ad67976cf
--- /dev/null
+++ b/clang/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')
OpenPOWER on IntegriCloud