[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
Fri Apr 15 05:03:45 PDT 2016


alexfh requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: clang-tidy/ClangTidyOptions.h:99
@@ +98,3 @@
+  /// \brief Stores all options that have higher priority than current one.
+  std::vector<ClangTidyOptions> HigherPriorityOptions;
+
----------------
As per offline discussion, there might be a more elegant and robust solution to this. For example, extending the `ClangTidyOptionsProvider` interface with a virtual `getRawOptions` method (ideas for a better name are welcome) returning an ordered list of `ClangTidyOption` objects accompanied by textual descriptions of their origin (defaults/configuration file name/command line option name). The `virtual ClangTidyOptions getOptions(llvm::StringRef FileName);` method can then be made non-virtual and serve as an interface for option consumers only (it would just merge all options returned by the former method).


http://reviews.llvm.org/D18694





More information about the cfe-commits mailing list