summaryrefslogtreecommitdiff
path: root/lib/FrontendTool
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2016-08-08 13:41:04 +0000
committerGabor Horvath <xazax.hun@gmail.com>2016-08-08 13:41:04 +0000
commitf12ee3b7751a95a6796e65eee39cb8e9ae4b3480 (patch)
tree5f41ce620c9d3250d8b24c2b922e8b163d9b153b /lib/FrontendTool
parentb4c0db24dd3f255bfb78f3899c4902b1c576722f (diff)
downloadclang-f12ee3b7751a95a6796e65eee39cb8e9ae4b3480.tar.gz
[analyzer] Command line option to show enabled checker list.
This patch adds a command line option to list the checkers that were enabled by analyzer-checker and not disabled by -analyzer-disable-checker. It can be very useful to debug long command lines when it is not immediately apparent which checkers are turned on and which checkers are turned off. Differential Revision: https://reviews.llvm.org/D23060 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/FrontendTool')
-rw-r--r--lib/FrontendTool/ExecuteCompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index 509c326d15..13cb52aa1e 100644
--- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -229,6 +229,11 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) {
ento::printCheckerHelp(llvm::outs(), Clang->getFrontendOpts().Plugins);
return true;
}
+ if (Clang->getAnalyzerOpts()->ShowEnabledCheckerList) {
+ ento::printEnabledCheckerList(llvm::outs(),
+ Clang->getFrontendOpts().Plugins,
+ *Clang->getAnalyzerOpts());
+ }
#endif
// If there were errors in processing arguments, don't do anything else.