[cfe-commits] r59975 - /cfe/trunk/lib/Analysis/RegionStore.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Mon Nov 24 11:39:40 PST 2008


Author: cornedbee
Date: Mon Nov 24 13:39:40 2008
New Revision: 59975

URL: http://llvm.org/viewvc/llvm-project?rev=59975&view=rev
Log:
Fix the fix of revision 59974. Now array-struct.c passes too.

Modified:
    cfe/trunk/lib/Analysis/RegionStore.cpp

Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=59975&r1=59974&r2=59975&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Mon Nov 24 13:39:40 2008
@@ -262,7 +262,8 @@
     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);





More information about the cfe-commits mailing list