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

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 08:13:54 PDT 2016


alexfh added inline comments.

================
Comment at: clang-tidy/tool/ClangTidyMain.cpp:329
@@ +328,3 @@
+    for (const std::string& Check : EnabledChecks) {
+      for (const ClangTidyOptions::StringPair &CheckSource:
+           EffectiveOptions.CheckSources) {
----------------
hokein wrote:
> I updated the patch and made sure the behavior keep the order of configuration.
> 
> But if the case like:
> 
> 1. enabled in binary
> 2. enabled in config file
> 3. enabled in command-line option `-checks`
> 
> Only command-line option `-checks` will be diagnosed, since the processor order of configuration is binary -> config file -> command-line option `-checks`.  
As discussed offline, the order of iteration matters here. And it looks like we should look at the complete Checks options without splitting them to components (in order to handle negative patterns).


http://reviews.llvm.org/D18694





More information about the cfe-commits mailing list