summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
diff options
context:
space:
mode:
authorKristof Umann <dkszelethus@gmail.com>2019-03-04 00:28:16 +0000
committerKristof Umann <dkszelethus@gmail.com>2019-03-04 00:28:16 +0000
commit088b1c9cdcdb3d83fa730c1fcbae6db8252fe76d (patch)
tree3ff1101103765384e7f37bb997ee6cd88faf4fe1 /clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
parent195a62e9ae50594e469398631a24f4bc26061c56 (diff)
downloadbcm5719-llvm-088b1c9cdcdb3d83fa730c1fcbae6db8252fe76d.tar.gz
bcm5719-llvm-088b1c9cdcdb3d83fa730c1fcbae6db8252fe76d.zip
[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
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
index 2575302ae22..2185561fcda 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
@@ -82,10 +82,10 @@ void ento::registerMmapWriteExecChecker(CheckerManager &mgr) {
mgr.registerChecker<MmapWriteExecChecker>();
Mwec->ProtExecOv =
mgr.getAnalyzerOptions()
- .getCheckerIntegerOption("MmapProtExec", 0x04, Mwec);
+ .getCheckerIntegerOption(Mwec, "MmapProtExec", 0x04);
Mwec->ProtReadOv =
mgr.getAnalyzerOptions()
- .getCheckerIntegerOption("MmapProtRead", 0x01, Mwec);
+ .getCheckerIntegerOption(Mwec, "MmapProtRead", 0x01);
}
bool ento::shouldRegisterMmapWriteExecChecker(const LangOptions &LO) {
OpenPOWER on IntegriCloud