aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index aaaafeb5ef..38722a2ed5 100644
--- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -571,7 +571,7 @@ ProgramStateRef MallocChecker::MallocMemAux(CheckerContext &C,
dyn_cast_or_null<SymbolicRegion>(RetVal.getAsRegion());
if (!R)
return 0;
- if (llvm::Optional<DefinedOrUnknownSVal> DefinedSize =
+ if (Optional<DefinedOrUnknownSVal> DefinedSize =
Size.getAs<DefinedOrUnknownSVal>()) {
SValBuilder &svalBuilder = C.getSValBuilder();
DefinedOrUnknownSVal Extent = R->getExtent(svalBuilder);
@@ -782,13 +782,11 @@ ProgramStateRef MallocChecker::FreeMemAux(CheckerContext &C,
}
bool MallocChecker::SummarizeValue(raw_ostream &os, SVal V) {
- if (llvm::Optional<nonloc::ConcreteInt> IntVal =
- V.getAs<nonloc::ConcreteInt>())
+ if (Optional<nonloc::ConcreteInt> IntVal = V.getAs<nonloc::ConcreteInt>())
os << "an integer (" << IntVal->getValue() << ")";
- else if (llvm::Optional<loc::ConcreteInt> ConstAddr =
- V.getAs<loc::ConcreteInt>())
+ else if (Optional<loc::ConcreteInt> ConstAddr = V.getAs<loc::ConcreteInt>())
os << "a constant address (" << ConstAddr->getValue() << ")";
- else if (llvm::Optional<loc::GotoLabel> Label = V.getAs<loc::GotoLabel>())
+ else if (Optional<loc::GotoLabel> Label = V.getAs<loc::GotoLabel>())
os << "the address of the label '" << Label->getLabel()->getName() << "'";
else
return false;