summaryrefslogtreecommitdiffstats
path: root/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
diff options
context:
space:
mode:
authorKristof Umann <dkszelethus@gmail.com>2019-01-26 14:23:08 +0000
committerKristof Umann <dkszelethus@gmail.com>2019-01-26 14:23:08 +0000
commit058a7a450aac183d28451191333b3eb33814f62a (patch)
tree07c0f89710aea1f833e3b0dd15cabc0f79e93b32 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
parentdb07683d866bdd0c1d2b651066081b64f9563333 (diff)
downloadbcm5719-llvm-058a7a450aac183d28451191333b3eb33814f62a.tar.gz
bcm5719-llvm-058a7a450aac183d28451191333b3eb33814f62a.zip
[analyzer] Supply all checkers with a shouldRegister function
Introduce the boolean ento::shouldRegister##CHECKERNAME(const LangOptions &LO) function very similarly to ento::register##CHECKERNAME. This will force every checker to implement this function, but maybe it isn't that bad: I saw a lot of ObjC or C++ specific checkers that should probably not register themselves based on some LangOptions (mine too), but they do anyways. A big benefit of this is that all registry functions now register their checker, once it is called, registration is guaranteed. This patch is a part of a greater effort to reinvent checker registration, more info here: D54438#1315953 Differential Revision: https://reviews.llvm.org/D55424 llvm-svn: 352277
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r--clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index fa5858021d7..2d3fb9035e8 100644
--- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -238,7 +238,7 @@ bool ExecuteCompilerInvocation(CompilerInstance *Clang) {
// This should happen AFTER plugins have been loaded!
if (Clang->getAnalyzerOpts()->ShowCheckerHelp) {
ento::printCheckerHelp(llvm::outs(), Clang->getFrontendOpts().Plugins,
- Clang->getDiagnostics());
+ Clang->getDiagnostics(), Clang->getLangOpts());
return true;
}
@@ -247,7 +247,8 @@ bool ExecuteCompilerInvocation(CompilerInstance *Clang) {
ento::printEnabledCheckerList(llvm::outs(),
Clang->getFrontendOpts().Plugins,
*Clang->getAnalyzerOpts(),
- Clang->getDiagnostics());
+ Clang->getDiagnostics(),
+ Clang->getLangOpts());
}
// Honor -analyzer-config-help.
OpenPOWER on IntegriCloud