]> granicus.if.org Git - clang/commit
[analyzer] Remove the default value arg from getChecker*Option
authorKristof Umann <kristof.umann@ericsson.com>
Fri, 17 May 2019 15:52:13 +0000 (15:52 +0000)
committerKristof Umann <kristof.umann@ericsson.com>
Fri, 17 May 2019 15:52:13 +0000 (15:52 +0000)
commitce3ecc9eafe661f832db05d94d6d96f966b63f46
tree4d4c892794eb655c2d713e35e7c46c8a5a473473
parent2033acf56e6a287b9fd32bd85e65c2ad21735583
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361042 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
lib/StaticAnalyzer/Checkers/CloneChecker.cpp
lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
lib/StaticAnalyzer/Checkers/MoveChecker.cpp
lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
test/Analysis/checker-plugins.c
test/Analysis/invalid-checker-option.c
test/Analysis/plugins/CheckerOptionHandling/CheckerOptionHandling.cpp
unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp