summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-11-11 12:52:39 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-11-11 12:52:39 +0000
commit83c4374e727c1259d0b204473e467dd20fa3b9f0 (patch)
tree944084b39cf3312e96ae22b9962b04a26fcba5a2 /clang/lib
parent4f7759a33966a0398a945b0afa830a09939f59f4 (diff)
downloadbcm5719-llvm-83c4374e727c1259d0b204473e467dd20fa3b9f0.tar.gz
bcm5719-llvm-83c4374e727c1259d0b204473e467dd20fa3b9f0.zip
Remove the old out-of-bound checking code.
llvm-svn: 86836
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Analysis/GRExprEngine.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp
index c7b803679e0..40283a1925e 100644
--- a/clang/lib/Analysis/GRExprEngine.cpp
+++ b/clang/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
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud