summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
diff options
context:
space:
mode:
authorKristof Umann <kristof.umann@ericsson.com>2019-05-17 15:52:13 +0000
committerKristof Umann <kristof.umann@ericsson.com>2019-05-17 15:52:13 +0000
commit83cc1b35d1871847bdb959d613abcb8bce15ffb2 (patch)
treecb59337e488501c5e4dcafdea0248660ec977ca3 /clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
parent3a02b12439f8ac9e459a34ad4d02d5bcf1a5540b (diff)
downloadbcm5719-llvm-83cc1b35d1871847bdb959d613abcb8bce15ffb2.tar.gz
bcm5719-llvm-83cc1b35d1871847bdb959d613abcb8bce15ffb2.zip
[analyzer] Remove the default value arg from getChecker*Option
Since D57922, the config table contains every checker option, and it's default value, so having it as an argument for getChecker*Option is redundant. By the time any of the getChecker*Option function is called, we verified the value in CheckerRegistry (after D57860), so we can confidently assert here, as any irregularities detected at this point must be a programmer error. However, in compatibility mode, verification won't happen, so the default value must be restored. This implies something else, other than adding removing one more potential point of failure -- debug.ConfigDumper will always contain valid values for checker/package options! Differential Revision: https://reviews.llvm.org/D59195 llvm-svn: 361042
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
index 11a33e50bf5..4fc225056d4 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
@@ -195,17 +195,17 @@ void ento::registerCloneChecker(CheckerManager &Mgr) {
auto *Checker = Mgr.registerChecker<CloneChecker>();
Checker->MinComplexity = Mgr.getAnalyzerOptions().getCheckerIntegerOption(
- Checker, "MinimumCloneComplexity", 50);
+ Checker, "MinimumCloneComplexity");
if (Checker->MinComplexity < 0)
Mgr.reportInvalidCheckerOptionValue(
Checker, "MinimumCloneComplexity", "a non-negative value");
Checker->ReportNormalClones = Mgr.getAnalyzerOptions().getCheckerBooleanOption(
- Checker, "ReportNormalClones", true);
+ Checker, "ReportNormalClones");
Checker->IgnoredFilesPattern = Mgr.getAnalyzerOptions()
- .getCheckerStringOption(Checker, "IgnoredFilesPattern", "");
+ .getCheckerStringOption(Checker, "IgnoredFilesPattern");
}
bool ento::shouldRegisterCloneChecker(const LangOptions &LO) {
OpenPOWER on IntegriCloud