Fix crash introduced by r83358 where a symbol could be eagerly
evaluated to an APSInt with a different bitwidth than the other
operand in a binary expression.

llvm-svn: 83368
diff --git a/clang/lib/Analysis/SimpleSValuator.cpp b/clang/lib/Analysis/SimpleSValuator.cpp
index 2869fab..636ce15 100644
--- a/clang/lib/Analysis/SimpleSValuator.cpp
+++ b/clang/lib/Analysis/SimpleSValuator.cpp
@@ -349,8 +349,13 @@
       // Does the symbol simplify to a constant?
       if (Sym->getType(ValMgr.getContext())->isIntegerType())
         if (const llvm::APSInt *Constant = state->getSymVal(Sym)) {
-          lhs = nonloc::ConcreteInt(*Constant);
-          continue;
+          // What should we convert it to?
+          if (nonloc::ConcreteInt *rhs_I = dyn_cast<nonloc::ConcreteInt>(&rhs)){
+            BasicValueFactory &BVF = ValMgr.getBasicValueFactory();
+            lhs = nonloc::ConcreteInt(BVF.Convert(rhs_I->getValue(),
+                                                  *Constant));
+            continue;
+          }
         }
       
       if (isa<nonloc::ConcreteInt>(rhs)) {