aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2008-11-24 19:39:40 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2008-11-24 19:39:40 +0000
commitddee68bf6b79c58ac0ca7ee6ded6692f8de14b05 (patch)
treece5edc27dea390ab8df598e737d2cfb49aa92458
parente95db4f2cd3ed4825a179bd7f151a5fc86b38e6f (diff)
Fix the fix of revision 59974. Now array-struct.c passes too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59975 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/RegionStore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 747b16d7b6..e2dd176139 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -262,7 +262,8 @@ SVal RegionStoreManager::getLValueElement(const GRState* St,
if (CI2->getValue().isUnsigned() ||
CI2->getValue().getBitWidth() < CI1->getValue().getBitWidth()) {
llvm::APSInt SI = CI2->getValue();
- SI.extend(CI1->getValue().getBitWidth());
+ if (CI2->getValue().getBitWidth() < CI1->getValue().getBitWidth())
+ SI.extend(CI1->getValue().getBitWidth());
SI.setIsSigned(true);
SignedInt = nonloc::ConcreteInt(getBasicVals().getValue(SI));
CI2 = cast<nonloc::ConcreteInt>(&SignedInt);