summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-01-26 19:54:12 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-01-26 19:54:12 +0000
commit54cb4c88e1885b5d08291ebf00d076bba20fd869 (patch)
treedfa8b236c22f2b7b58b96f432de1c29ebe3eee97 /clang
parent31af4e08d1f3565ead6e069508872f7cca04f531 (diff)
downloadbcm5719-llvm-54cb4c88e1885b5d08291ebf00d076bba20fd869.tar.gz
bcm5719-llvm-54cb4c88e1885b5d08291ebf00d076bba20fd869.zip
Correct size assumption; fixes a crash on amd64.
llvm-svn: 63031
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Analysis/RegionStore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index f519d4d1cd1..e50b0abb61e 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/lib/Analysis/RegionStore.cpp
@@ -888,7 +888,8 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
ConstantArrayType* CAT = cast<ConstantArrayType>(T.getTypePtr());
llvm::APSInt Size(CAT->getSize(), false);
- llvm::APSInt i = getBasicVals().getZeroWithPtrWidth(false);
+ llvm::APSInt i = getBasicVals().getValue(0, Size.getBitWidth(),
+ Size.isUnsigned());
// Check if the init expr is a StringLiteral.
if (isa<loc::MemRegionVal>(Init)) {
OpenPOWER on IntegriCloud