[analyzer] Enable subcheckers to possess checker options
authorKristof Umann <dkszelethus@gmail.com>
Mon, 4 Mar 2019 00:28:16 +0000 (00:28 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Mon, 4 Mar 2019 00:28:16 +0000 (00:28 +0000)
commit088b1c9cdcdb3d83fa730c1fcbae6db8252fe76d
tree3ff1101103765384e7f37bb997ee6cd88faf4fe1
parent195a62e9ae50594e469398631a24f4bc26061c56
[analyzer] Enable subcheckers to possess checker options

Under the term "subchecker", I mean checkers that do not have a checker class on
their own, like unix.MallocChecker to unix.DynamicMemoryModeling.

Since a checker object was required in order to retrieve checker options,
subcheckers couldn't possess options on their own.

This patch is also an excuse to change the argument order of getChecker*Option,
it always bothered me, now it resembles the actual command line argument
(checkername:option=value).

Differential Revision: https://reviews.llvm.org/D57579

llvm-svn: 355297
14 files changed:
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
clang/unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp