Refactored code for transfer functions for binary operators involving two LValues.

Fixed bug in transfer functions for sizeof(*); we were incorrectly evaluating to
a value of the wrong type.

Fixed bug in transfer functions for compound assignments where we did not properly
handle assignments involving dereferences of symbolic values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47190 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/GRSimpleVals.cpp b/Analysis/GRSimpleVals.cpp
index c9827d9..75dc256 100644
--- a/Analysis/GRSimpleVals.cpp
+++ b/Analysis/GRSimpleVals.cpp
@@ -163,6 +163,24 @@
 }
 
 
+// Binary Operators (except assignments and comma).
+
+RValue GRSimpleVals::EvalBinaryOp(ValueManager& ValMgr,
+                                  BinaryOperator::Opcode Op,
+                                  LValue LHS, LValue RHS) {
+  
+  switch (Op) {
+    default:
+      return UnknownVal();
+      
+    case BinaryOperator::EQ:
+      return EvalEQ(ValMgr, LHS, RHS);
+      
+    case BinaryOperator::NE:
+      return EvalNE(ValMgr, LHS, RHS);      
+  }
+}
+
 // Pointer arithmetic.
 
 LValue GRSimpleVals::EvalBinaryOp(ValueManager& ValMgr,