[PATCH] Clang-tidy: added --disable-checks, --list-checks options.

Manuel Klimek klimek at google.com
Thu Dec 19 10:11:13 PST 2013



================
Comment at: clang-tidy/ClangTidy.h:88
@@ -87,1 +87,3 @@
 
+/// \brief Fills the list of check names, that are enabled when the provided
+/// filters are applied.
----------------
Nit: s/,//

================
Comment at: clang-tidy/ClangTidy.h:90
@@ +89,3 @@
+/// filters are applied.
+void getCheckNames(StringRef EnableChecksRegex, StringRef DisableChecksRegex,
+                   SmallVectorImpl<std::string> &CheckNames);
----------------
Any reason not to return by value?

================
Comment at: clang-tidy/ClangTidyModule.h:70
@@ +69,3 @@
+/// \brief Filters checks by name.
+class ChecksFilter {
+public:
----------------
Is there any reason to have this interface? It looks to me like we only ever create a single instance...

================
Comment at: clang-tidy/ClangTidy.cpp:112
@@ +111,3 @@
+    for (unsigned i = 0; i < Checkers.size(); ++i) {
+      std::string Checker(Twine(AnalyzerCheckerNamePrefix, Checkers[i]).str());
+      AnalyzerChecksEnabled |=
----------------
I'd slightly prefer using (... + ...).str() here (but feel free to leave as is).


http://llvm-reviews.chandlerc.com/D2444



More information about the cfe-commits mailing list