]> granicus.if.org Git - clang/commitdiff
After performing a bounds check in ArrayBoundChecker, record the fact that a bounds...
authorTed Kremenek <kremenek@apple.com>
Mon, 23 Nov 2009 23:23:26 +0000 (23:23 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 23 Nov 2009 23:23:26 +0000 (23:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89712 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ArrayBoundChecker.cpp

index 3d8b3b3d1b14c913797f12c9829174dd33b4b16e..5ab2337a8e38f1ff784dc989daa53a2626f4e7a1 100644 (file)
@@ -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);
 }