From 5bc40d9b188bb43e2aafafe58d8d169cc7c9b4f1 Mon Sep 17 00:00:00 2001 From: Kristof Umann Date: Thu, 23 May 2019 21:46:51 +0000 Subject: [analyzer] List checkers in 3 categories: released, alpha, developer Previously, the only way to display the list of available checkers was to invoke the analyzer with -analyzer-checker-help frontend flag. This however wasn't really great from a maintainer standpoint: users came across checkers meant strictly for development purposes that weren't to be tinkered with, or those that were still in development. This patch creates a clearer division in between these categories. From now on, we'll have 3 flags to display the list checkers. These lists are mutually exclusive and can be used in any combination (for example to display both stable and alpha checkers). -analyzer-checker-help: Displays the list for stable, production ready checkers. -analyzer-checker-help-alpha: Displays the list for in development checkers. Enabling is discouraged for non-development purposes. -analyzer-checker-help-developer: Modeling and debug checkers. Modeling checkers shouldn't be enabled/disabled by hand, and debug checkers shouldn't be touched by users. Differential Revision: https://reviews.llvm.org/D62093 llvm-svn: 361558 --- clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/FrontendTool') diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 27690be777b..ea720c83c29 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -238,7 +238,8 @@ bool ExecuteCompilerInvocation(CompilerInstance *Clang) { AnalyzerOptions &AnOpts = *Clang->getAnalyzerOpts(); // Honor -analyzer-checker-help and -analyzer-checker-help-hidden. - if (AnOpts.ShowCheckerHelp || AnOpts.ShowCheckerHelpHidden) { + if (AnOpts.ShowCheckerHelp || AnOpts.ShowCheckerHelpAlpha || + AnOpts.ShowCheckerHelpDeveloper) { ento::printCheckerHelp(llvm::outs(), Clang->getFrontendOpts().Plugins, AnOpts, -- cgit v1.2.3