1*67e74705SXin Li // This is a regression test for handling of stat caches within the tooling 2*67e74705SXin Li // infrastructure. This test reproduces the problem under valgrind: 3*67e74705SXin Li 4*67e74705SXin Li // First, create a pch that we can later load. Loading the pch will insert 5*67e74705SXin Li // a stat cache into the FileManager: 6*67e74705SXin Li // RUN: %clang -x c++-header %S/Inputs/pch.h -o %t1 7*67e74705SXin Li 8*67e74705SXin Li // Use the generated pch and enforce a subsequent stat miss by using 9*67e74705SXin Li // the test file with an unrelated include as second translation unit. 10*67e74705SXin Li // Test for an non-empty file after clang-check is executed. 11*67e74705SXin Li // RUN: clang-check -ast-dump "%S/Inputs/pch.cpp" "%s" -- -include-pch %t1 -I "%S" -c >%t2 2>&1 12*67e74705SXin Li // RUN: test -s %t2 13*67e74705SXin Li 14*67e74705SXin Li #include "Inputs/pch-fail.h" 15