summaryrefslogtreecommitdiff
path: root/clang/test/PCH/modified-header-error.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/PCH/modified-header-error.c')
-rw-r--r--clang/test/PCH/modified-header-error.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/PCH/modified-header-error.c b/clang/test/PCH/modified-header-error.c
new file mode 100644
index 0000000..ef92494
--- /dev/null
+++ b/clang/test/PCH/modified-header-error.c
@@ -0,0 +1,12 @@
+// RUN: mkdir -p %t.dir
+// RUN: echo '#include "header2.h"' > %t.dir/header1.h
+// RUN: echo > %t.dir/header2.h
+// RUN: cp %s %t.dir/t.c
+// RUN: %clang_cc1 -x c-header %t.dir/header1.h -emit-pch -o %t.pch
+// RUN: echo >> %t.dir/header2.h
+// RUN: %clang_cc1 %t.dir/t.c -include-pch %t.pch -fsyntax-only 2>&1 | FileCheck %s
+
+#include "header2.h"
+
+// CHECK: fatal error: file {{.*}} has been modified since the precompiled header was built
+// REQUIRES: shell