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