Introduce an opt-in warning when a module is being implicitly built
from sources.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140746 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Modules/on-demand-build-warnings.m b/test/Modules/on-demand-build-warnings.m
new file mode 100644
index 0000000..ea53169
--- /dev/null
+++ b/test/Modules/on-demand-build-warnings.m
@@ -0,0 +1,5 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Wmodule-build -fmodule-cache-path %t -F %S/Inputs -DFOO -verify %s
+
+__import_module__ Module; // expected-warning{{building module 'Module' from source}}
+