Fix  "strbuf += stufflen;" crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43365 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp
index 0d86ccc..9bfd82e 100644
--- a/CodeGen/CGExprScalar.cpp
+++ b/CodeGen/CGExprScalar.cpp
@@ -618,8 +618,10 @@
   // Convert the LHS/RHS values to the computation type.
   OpInfo.LHS = EmitScalarConversion(OpInfo.LHS, LHSTy, ComputeType);
   
-  // Do not merge types for -= where the LHS is a pointer.
-  if (E->getOpcode() != BinaryOperator::SubAssign ||
+  // Do not merge types for -= or += where the LHS is a pointer.
+  if (!(E->getOpcode() == BinaryOperator::SubAssign ||
+          E->getOpcode() == BinaryOperator::AddAssign) ||
+  //  if (E->getOpcode() != BinaryOperator::SubAssign ||
       !E->getLHS()->getType()->isPointerType()) {
     OpInfo.RHS = EmitScalarConversion(OpInfo.RHS, RHSTy, ComputeType);
   }