This changeset improves check_clang_tidy.py to allow chnages made by a check to a header to be verified.
A new argument --header-filter allows the test file to specify the header that will be modified by the check.
check_clang_tidy.py will then:
- Copy the named header to the same temporary directory containing the source file
- Scrub CHECK-FIXES and CHECK-FIXES text from the copied header
- Run the clang-tidy on the scrubbed source files with:
- -header-filter and the name of the copied header file.
- -I . to specify the temporary directory in the include search path
- Verify messages and fixes on the source file.
- Verify messages and fixes on the header file.
- In the case of failure, report differences on the header and the source file.
The name of the flag might be confusing, since it doesn't have the same meaning as the clang-tidy flag with the same name. The clang-tidy --header-filter flag is a regular expression, but this one is a single header filename.