pch.cpp 658 B

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