aboutsummaryrefslogtreecommitdiff
path: root/test/PCH/module-hash-difference.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/module-hash-difference.m')
-rw-r--r--test/PCH/module-hash-difference.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/PCH/module-hash-difference.m b/test/PCH/module-hash-difference.m
new file mode 100644
index 000000000000..073540eb540c
--- /dev/null
+++ b/test/PCH/module-hash-difference.m
@@ -0,0 +1,8 @@
+// RUN: rm -rf %t.mcp
+// RUN: rm -rf %t.err
+// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %S/Inputs/modules -fmodules -fmodules-cache-path=%t.mcp
+// RUN: not %clang_cc1 -fsyntax-only -include-pch %t.pch %s -I %S/Inputs/modules -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash 2> %t.err
+// RUN: FileCheck -input-file=%t.err %s
+
+// CHECK: error: PCH was compiled with module cache path {{.*}}, but the path is currently {{.*}}
+@import Foo;