diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-11 12:52:39 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-11 12:52:39 +0000 |
commit | 6cc46edcd7e1f507fa231bdb1fa035ad08b5782c (patch) | |
tree | 5c7ae564a146f6a43f475d38ef6b6528b64da763 /lib/Analysis/GRExprEngine.cpp | |
parent | 58e689fead1490611bcd114fb707bfc08a12049e (diff) |
Remove the old out-of-bound checking code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index c7b803679e..40283a1925 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -1270,48 +1270,6 @@ void GRExprEngine::EvalLocation(ExplodedNodeSet &Dst, Stmt *S, // Update which NodeSet is the current one. PrevSet = CurrSet; } - - // FIXME: Temporarily disable out-of-bounds checking until we make - // the logic reflect recent changes to CastRegion and friends. -#if 0 - // Check for out-of-bound array access. - if (isa<loc::MemRegionVal>(LV)) { - const MemRegion* R = cast<loc::MemRegionVal>(LV).getRegion(); - if (const ElementRegion* ER = dyn_cast<ElementRegion>(R)) { - // Get the index of the accessed element. - SVal Idx = ER->getIndex(); - // Get the extent of the array. - SVal NumElements = getStoreManager().getSizeInElements(StNotNull, - ER->getSuperRegion()); - - const GRState * StInBound = StNotNull->AssumeInBound(Idx, NumElements, - true); - const GRState* StOutBound = StNotNull->AssumeInBound(Idx, NumElements, - false); - - if (StOutBound) { - // Report warning. Make sink node manually. - ExplodedNode* OOBNode = - Builder->generateNode(Ex, StOutBound, Pred, - ProgramPoint::PostOutOfBoundsCheckFailedKind); - - if (OOBNode) { - OOBNode->markAsSink(); - - if (StInBound) - ImplicitOOBMemAccesses.insert(OOBNode); - else - ExplicitOOBMemAccesses.insert(OOBNode); - } - } - - if (!StInBound) - return NULL; - - StNotNull = StInBound; - } - } -#endif } //===----------------------------------------------------------------------===// |