[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 8 04:36:55 PDT 2018


alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

Given Artem's answer (and if there are no objections from other CSA maintainers), I have no concerns with this patch going in. A couple of minor nits.



================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.h:190-191
 
+  /// \brief Turns on experimental alpha checkers from the static analyzer.
+  bool isAlphaChecksAllowed() const {
+    return AllowEnablingAnalyzerAlphaCheckers;
----------------
Let's call this function more consistently with all other instances of this setting, e.g. canEnableAnalyzerAlphaCheckers() (alternatively, mayEnableAnalyzerAlphaCheckers) and change the comment to be in line with the actual meaning of the function (it doesn't turn on alpha checkers, it merely allows them to be enabled).


================
Comment at: test/clang-tidy/enable-alpha-checks.cpp:1
+// Check if '-allow-enabling-analyzer-alpha-checkers' is visible for users
+// RUN: clang-tidy -help | not grep 'allow-enabling-analyzer-alpha-checkers'
----------------
nit: Add a trailing period.


https://reviews.llvm.org/D46159





More information about the cfe-commits mailing list