summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-23 23:23:26 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-23 23:23:26 +0000
commitb0c0b08c71761895faf6fb649925b53823136f23 (patch)
treee5cd75fc415fba9492ff361554ed8282b9a573b0 /clang/lib
parentde5dea869f041b7d19ff1da108df3f5c5c4b31ba (diff)
downloadbcm5719-llvm-b0c0b08c71761895faf6fb649925b53823136f23.tar.gz
bcm5719-llvm-b0c0b08c71761895faf6fb649925b53823136f23.zip
After performing a bounds check in ArrayBoundChecker, record the fact that a bounds check succeeded by transitioning the ExplodedGraph.
llvm-svn: 89712
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Analysis/ArrayBoundChecker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Analysis/ArrayBoundChecker.cpp b/clang/lib/Analysis/ArrayBoundChecker.cpp
index 3d8b3b3d1b1..5ab2337a8e3 100644
--- a/clang/lib/Analysis/ArrayBoundChecker.cpp
+++ b/clang/lib/Analysis/ArrayBoundChecker.cpp
@@ -80,5 +80,11 @@ void ArrayBoundChecker::VisitLocation(CheckerContext &C, const Stmt *S, SVal l){
report->addRange(S->getSourceRange());
C.EmitReport(report);
+ return;
}
+
+ // Array bound check succeeded. From this point forward the array bound
+ // should always succeed.
+ assert(StInBound);
+ C.addTransition(StInBound);
}
OpenPOWER on IntegriCloud