Implement code completion support for module import declarations, e.g.,

  @import <complete with module names here>

or

  @import std.<complete with submodule names here>

Addresses <rdar://problem/10710117>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149199 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Index/complete-modules.m b/test/Index/complete-modules.m
new file mode 100644
index 0000000..a873721
--- /dev/null
+++ b/test/Index/complete-modules.m
@@ -0,0 +1,14 @@
+// Note: the run lines follow their respective tests, since line/column
+// matter in this test.
+
+@import LibA.Extensions;
+
+// RUN: rm -rf %t
+// RUN: c-index-test -code-completion-at=%s:4:9 -fmodule-cache-path %t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-TOP-LEVEL %s
+// CHECK-TOP-LEVEL: NotImplemented:{TypedText Framework} (50)
+// CHECK-TOP-LEVEL: NotImplemented:{TypedText LibA} (50)
+// CHECK-TOP-LEVEL: NotImplemented:{TypedText nested} (50)
+
+// RUN: c-index-test -code-completion-at=%s:4:14 -fmodule-cache-path %t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-LIBA %s
+// CHECK-LIBA: NotImplemented:{TypedText Extensions} (50)
+