[PATCH] D17482: [clang-tidy] Allow tests to verify changes made to header files

Richard via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 20 08:13:18 PST 2016


LegalizeAdulthood created this revision.
LegalizeAdulthood added a reviewer: alexfh.
LegalizeAdulthood added a subscriber: cfe-commits.

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.

http://reviews.llvm.org/D17482

Files:
  test/clang-tidy/check_clang_tidy.py
  test/clang-tidy/modernize-redundant-void-arg.cpp
  test/clang-tidy/modernize-redundant-void-arg.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17482.48594.patch
Type: text/x-patch
Size: 9019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160220/2b42a8df/attachment.bin>


More information about the cfe-commits mailing list