diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Tooling/Inputs/lit.local.cfg | 1 | ||||
-rw-r--r-- | test/Tooling/Inputs/pch-fail.h | 0 | ||||
-rw-r--r-- | test/Tooling/Inputs/pch.cpp | 0 | ||||
-rw-r--r-- | test/Tooling/Inputs/pch.h | 0 | ||||
-rw-r--r-- | test/Tooling/pch.cpp | 21 |
5 files changed, 22 insertions, 0 deletions
diff --git a/test/Tooling/Inputs/lit.local.cfg b/test/Tooling/Inputs/lit.local.cfg new file mode 100644 index 0000000000..e6f55eef7a --- /dev/null +++ b/test/Tooling/Inputs/lit.local.cfg @@ -0,0 +1 @@ +config.suffixes = [] diff --git a/test/Tooling/Inputs/pch-fail.h b/test/Tooling/Inputs/pch-fail.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/Tooling/Inputs/pch-fail.h diff --git a/test/Tooling/Inputs/pch.cpp b/test/Tooling/Inputs/pch.cpp new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/Tooling/Inputs/pch.cpp diff --git a/test/Tooling/Inputs/pch.h b/test/Tooling/Inputs/pch.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/Tooling/Inputs/pch.h diff --git a/test/Tooling/pch.cpp b/test/Tooling/pch.cpp new file mode 100644 index 0000000000..bfa20d806b --- /dev/null +++ b/test/Tooling/pch.cpp @@ -0,0 +1,21 @@ +// This is a regression test for handling of stat caches within the tooling +// infrastructure. This test reproduces the problem under valgrind: + +// First, create a pch that we can later load. Loading the pch will insert +// a stat cache into the FileManager: +// RUN: %clang -x c++-header %S/Inputs/pch.h -o %t1 + +// Use the generated pch and enforce a subsequent stat miss by by using +// the test file with an unrelated include as second translation unit: +// Do not directly pipe into FileCheck, as that would hide errors from +// valgrind due to pipefail not being set in lit. +// RUN: clang-check "%S/Inputs/pch.cpp" "%s" -- -include-pch %t1 -I "%S" -c >%t2 2>&1 +// RUN: FileCheck %s < %t2 + +#include "Inputs/pch-fail.h" + +// CHECK: Processing + +// FIXME: This is incompatible to -fms-compatibility. +// XFAIL: win32 + |