summaryrefslogtreecommitdiffstats
path: root/test/PCH/remap-file-from-pch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/remap-file-from-pch.cpp')
-rw-r--r--test/PCH/remap-file-from-pch.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/PCH/remap-file-from-pch.cpp b/test/PCH/remap-file-from-pch.cpp
new file mode 100644
index 0000000..8b965cf
--- /dev/null
+++ b/test/PCH/remap-file-from-pch.cpp
@@ -0,0 +1,10 @@
+// %clang_cc1 -remap-file "%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s
+
+// RUN: %clang_cc1 -x c++-header %s.h -emit-pch -o %t.pch
+// RUN: %clang_cc1 %s -include-pch %t.pch -remap-file "%s.h;%s.remap.h" -fsyntax-only 2>&1 | FileCheck %s
+
+const char *str = STR;
+int ge = zool;
+
+// CHECK: file '{{.*[/\\]}}remap-file-from-pch.cpp.h' from the precompiled header has been overridden
+// CHECK: use of undeclared identifier 'zool'
OpenPOWER on IntegriCloud