diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-04 08:52:47 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-04 08:52:47 +0000 |
commit | b5b848e046e1899a3ebab4ca3822ae97eef36b1e (patch) | |
tree | d898b4fb89a10e9bf1c61de81485710888d2899f /lib/Analysis/BasicStore.cpp | |
parent | 8d3d13e234e4236e9ace7fa753c5946307504cdb (diff) |
array indexes are unsigned integers of the same width as pointer.
no-outofbounds.c still fails. Previously it passed because the array index
is mistakenly a loc::ConcreteInt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r-- | lib/Analysis/BasicStore.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index 969e4c9654..598191f578 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -213,11 +213,10 @@ SVal BasicStoreManager::getLValueElement(const GRState* St, const MemRegion *R = cast<loc::MemRegionVal>(BaseL).getRegion(); if (isa<ElementRegion>(R)) { - // Basic example: - // char buf[100]; - // char *q = &buf[1]; // p points to ElementRegion(buf,Unknown) - // &q[10] - //assert(cast<ElementRegion>(R)->getIndex().isUnknown()); + // int x; + // char* y = (char*) &x; + // 'y' => ElementRegion(0, VarRegion('x')) + // y[0] = 'a'; return Base; } |