summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorHenry Wong <movietravelcode@outlook.com>2018-05-30 11:46:45 +0000
committerHenry Wong <movietravelcode@outlook.com>2018-05-30 11:46:45 +0000
commit716515a51e53e619f5d07ada8de00a05e18dfe3f (patch)
treec6c38f5b004af05c9360eb087ee3afae8d31734a /clang/lib
parent39710e35552cd41524da73b3dcd4d9e41e63938f (diff)
downloadbcm5719-llvm-716515a51e53e619f5d07ada8de00a05e18dfe3f.tar.gz
bcm5719-llvm-716515a51e53e619f5d07ada8de00a05e18dfe3f.zip
[analyzer] Remove the redundant check about same state transition in `ArrayBoundCheckerV2.cpp`.
Summary: Since the `addTransitionImpl()` has a check about same state transition, there is no need to check it in `ArrayBoundCheckerV2.cpp`. Reviewers: NoQ, xazax.hun, george.karpenkov Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, cfe-commits, MTC Differential Revision: https://reviews.llvm.org/D47451 llvm-svn: 333531
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
index ebe9f99f962..933380d494a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
@@ -125,7 +125,6 @@ void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad,
// have some flexibility in defining the base region, we can achieve
// various levels of conservatism in our buffer overflow checking.
ProgramStateRef state = checkerContext.getState();
- ProgramStateRef originalState = state;
SValBuilder &svalBuilder = checkerContext.getSValBuilder();
const RegionRawOffsetV2 &rawOffset =
@@ -224,8 +223,7 @@ void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad,
}
while (false);
- if (state != originalState)
- checkerContext.addTransition(state);
+ checkerContext.addTransition(state);
}
void ArrayBoundCheckerV2::reportOOB(
OpenPOWER on IntegriCloud