[PATCH] D18694: [ClangTidy] Add an 'explain-checks' option to diagnose where each checks comes from.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 01:58:09 PDT 2016


hokein marked an inline comment as done.
hokein added a comment.

In http://reviews.llvm.org/D18694#396797, @alexfh wrote:

> I've just realized that the approach is artificially limited to just keeping track of the origin of the `Checks` option, while it could be easily extended to track the origin of all configuration items. What if instead of `std::vector<StringPair> CheckSources;` we introduce `std::vector<std::pair<std::string, ClangTidyOptions>> Sources;`? Then we could be able to find where a certain check option or an extra argument was introduced, for example. WDYT?


Update the patch according to our offline discussion. One different thing is that we can't assume that `Other` in `merge(CTO& Other)` has empty `HigherPriorityOptions` because some usages <http://clang.llvm.org/extra/doxygen/ClangTidyDiagnosticConsumer_8cpp_source.html#l00226> break this assumption.


http://reviews.llvm.org/D18694





More information about the cfe-commits mailing list