Have the parser initialize Sema before it consumes the first
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167423 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Modules/direct-module-import.m b/test/Modules/direct-module-import.m
new file mode 100644
index 0000000..317d7ae
--- /dev/null
+++ b/test/Modules/direct-module-import.m
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -F %S/Inputs -include Module/Module.h %s -emit-llvm -o - | FileCheck %s
+
+// CHECK: call i8* @getModuleVersion
+const char* getVer(void) {
+  return getModuleVersion();
+}