diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp index aa70db041c76..1906ca5c8f55 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp @@ -48,8 +48,8 @@ void MmapWriteExecChecker::checkPreCall(const CallEvent &Call, CheckerContext &C) const { if (matchesAny(Call, MmapFn, MprotectFn)) { SVal ProtVal = Call.getArgSVal(2); - Optional<nonloc::ConcreteInt> ProtLoc = ProtVal.getAs<nonloc::ConcreteInt>(); - int64_t Prot = ProtLoc->getValue().getSExtValue(); + auto ProtLoc = ProtVal.castAs<nonloc::ConcreteInt>(); + int64_t Prot = ProtLoc.getValue().getSExtValue(); if (ProtExecOv != ProtExec) ProtExec = ProtExecOv; if (ProtReadOv != ProtRead) |
