[PATCH] D54141: [clang-tidy] add deduplication support for run-clang-tidy.py

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 6 02:20:00 PST 2018


JonasToth created this revision.
JonasToth added reviewers: alexfh, aaron.ballman, hokein, sammccall, lebedev.ri.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.

`run-clang-tidy.py` is the parallel executor for `clang-tidy`. Due to the
common header-inclusion problem in C++/C diagnostics that are usually emitted
in class declarations are emitted every time their corresponding header is
included.

This results in a *VERY* high amount of spam and renders the output basically
useles for bigger projects.
With this patch `run-clang-tidy.py` gets another option that enables
deduplication of all emitted diagnostics. This is achieved with parsing the
diagnostic output from each `clang-tidy` invocation, identifying warnings and
error and parsing until the next occurence of an error or warning. The collected
diagnostic is hashed and stored in a set. Every new diagnostic will only be
emitted if its hash is not in the set already.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54141

Files:
  clang-tidy/tool/run-clang-tidy.py
  clang-tidy/tool/run_clang_tidy.py
  clang-tidy/tool/test_input/out_csa_cmake.log
  clang-tidy/tool/test_input/out_performance_cmake.log
  clang-tidy/tool/test_log_parser.py
  docs/ReleaseNotes.rst

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54141.172724.patch
Type: text/x-patch
Size: 40045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181106/94a3df28/attachment-0001.bin>


More information about the cfe-commits mailing list