aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Modules/Inputs/Module.framework/Headers/Module.h6
-rw-r--r--test/Modules/on-demand-build.m11
2 files changed, 17 insertions, 0 deletions
diff --git a/test/Modules/Inputs/Module.framework/Headers/Module.h b/test/Modules/Inputs/Module.framework/Headers/Module.h
new file mode 100644
index 0000000000..1d9278b0ca
--- /dev/null
+++ b/test/Modules/Inputs/Module.framework/Headers/Module.h
@@ -0,0 +1,6 @@
+const char *getModuleVersion(void);
+
+@interface Module
++(const char *)version;
+@end
+
diff --git a/test/Modules/on-demand-build.m b/test/Modules/on-demand-build.m
new file mode 100644
index 0000000000..2191499cec
--- /dev/null
+++ b/test/Modules/on-demand-build.m
@@ -0,0 +1,11 @@
+// RUN: mkdir -p %t
+// RUN: rm -f %t/Module.pcm
+// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs -verify %s
+
+__import_module__ Module;
+void test_getModuleVersion() {
+ int version = getModuleVersion(); // expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'const char *'}}
+ int version2 = [Module version]; // expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'const char *'}}
+}
+
+