annotate clang/test/Tooling/pch.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // This is a regression test for handling of stat caches within the tooling
anatofuz
parents:
diff changeset
2 // infrastructure. This test reproduces the problem under valgrind:
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // First, create a pch that we can later load. Loading the pch will insert
anatofuz
parents:
diff changeset
5 // a stat cache into the FileManager:
anatofuz
parents:
diff changeset
6 // RUN: %clang -x c++-header %S/Inputs/pch.h -o %t1
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 // Use the generated pch and enforce a subsequent stat miss by using
anatofuz
parents:
diff changeset
9 // the test file with an unrelated include as second translation unit.
anatofuz
parents:
diff changeset
10 // Test for an non-empty file after clang-check is executed.
anatofuz
parents:
diff changeset
11 // RUN: clang-check -ast-dump "%S/Inputs/pch.cpp" "%s" -- -include-pch %t1 -I "%S" -c >%t2 2>&1
anatofuz
parents:
diff changeset
12 // RUN: test -s %t2
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 #include "Inputs/pch-fail.h"