diff options
Diffstat (limited to 'clang/lib')
4 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp index 6983e0e99b5..93ad17cffb3 100644 --- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp @@ -254,7 +254,7 @@ ProgramStateRef StdLibraryFunctionsChecker::ValueRange::applyAsOutOfRange( const llvm::APSInt &Min = BVF.getValue(R[I].first, T); const llvm::APSInt &Max = BVF.getValue(R[I].second, T); assert(Min <= Max); - State = CM.assumeWithinInclusiveRange(State, *N, Min, Max, false); + State = CM.assumeInclusiveRange(State, *N, Min, Max, false); if (!State) break; } @@ -288,7 +288,7 @@ StdLibraryFunctionsChecker::ValueRange::applyAsWithinRange( const llvm::APSInt &Left = BVF.getValue(R[0].first - 1ULL, T); if (Left != PlusInf) { assert(MinusInf <= Left); - State = CM.assumeWithinInclusiveRange(State, *N, MinusInf, Left, false); + State = CM.assumeInclusiveRange(State, *N, MinusInf, Left, false); if (!State) return nullptr; } @@ -296,7 +296,7 @@ StdLibraryFunctionsChecker::ValueRange::applyAsWithinRange( const llvm::APSInt &Right = BVF.getValue(R[E - 1].second + 1ULL, T); if (Right != MinusInf) { assert(Right <= PlusInf); - State = CM.assumeWithinInclusiveRange(State, *N, Right, PlusInf, false); + State = CM.assumeInclusiveRange(State, *N, Right, PlusInf, false); if (!State) return nullptr; } @@ -305,7 +305,7 @@ StdLibraryFunctionsChecker::ValueRange::applyAsWithinRange( const llvm::APSInt &Min = BVF.getValue(R[I - 1].second + 1ULL, T); const llvm::APSInt &Max = BVF.getValue(R[I].first - 1ULL, T); assert(Min <= Max); - State = CM.assumeWithinInclusiveRange(State, *N, Min, Max, false); + State = CM.assumeInclusiveRange(State, *N, Min, Max, false); if (!State) return nullptr; } diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 6a3cdb2f76f..fa109d9dab6 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1836,7 +1836,7 @@ void ExprEngine::processSwitch(SwitchNodeBuilder& builder) { ProgramStateRef StateCase; if (Optional<NonLoc> NL = CondV.getAs<NonLoc>()) std::tie(StateCase, DefaultSt) = - DefaultSt->assumeWithinInclusiveRange(*NL, V1, V2); + DefaultSt->assumeInclusiveRange(*NL, V1, V2); else // UnknownVal StateCase = DefaultSt; diff --git a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp index 4051242434e..9cb344e32c7 100644 --- a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp @@ -190,7 +190,7 @@ ProgramStateRef SimpleConstraintManager::assumeAux(ProgramStateRef state, } // end switch } -ProgramStateRef SimpleConstraintManager::assumeWithinInclusiveRange( +ProgramStateRef SimpleConstraintManager::assumeInclusiveRange( ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To, bool InRange) { @@ -207,7 +207,7 @@ ProgramStateRef SimpleConstraintManager::assumeWithinInclusiveRange( switch (Value.getSubKind()) { default: - llvm_unreachable("'assumeWithinInclusiveRange' is not implemented" + llvm_unreachable("'assumeInclusiveRange' is not implemented" "for this NonLoc"); case nonloc::LocAsIntegerKind: diff --git a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h index b26bc948611..f4366397769 100644 --- a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h +++ b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h @@ -38,7 +38,7 @@ public: ProgramStateRef assume(ProgramStateRef state, NonLoc Cond, bool Assumption); - ProgramStateRef assumeWithinInclusiveRange(ProgramStateRef State, + ProgramStateRef assumeInclusiveRange(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To, |