simplify max type computation by making it return an integer (like 
getFloatingTypeOrder) instead of a type.  Fix a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49297 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 73e075f..a661d01 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1068,8 +1068,8 @@
     const ComplexType *rhsComplexInt = rhs->getAsComplexIntegerType();
 
     if (lhsComplexInt && rhsComplexInt) {
-      if (Context.getMaxIntegerType(lhsComplexInt->getElementType(), 
-                                    rhsComplexInt->getElementType()) == lhs) {
+      if (Context.getIntegerTypeOrder(lhsComplexInt->getElementType(), 
+                                      rhsComplexInt->getElementType()) >= 0) {
         // convert the rhs
         if (!isCompAssign) ImpCastExprToType(rhsExpr, lhs);
         return lhs;
@@ -1088,7 +1088,7 @@
     }
   }
   // Finally, we have two differing integer types.
-  if (Context.getMaxIntegerType(lhs, rhs) == lhs) { // convert the rhs
+  if (Context.getIntegerTypeOrder(lhs, rhs) >= 0) { // convert the rhs
     if (!isCompAssign) ImpCastExprToType(rhsExpr, lhs);
     return lhs;
   }