fix rdar://7446395, a crash on invalid, by fixing a broken assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90647 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index da1fe3d..bb040b2 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -5014,6 +5014,7 @@
                                     unsigned OpaqueOpc, bool isRelational) {
   BinaryOperator::Opcode Opc = (BinaryOperator::Opcode)OpaqueOpc;
 
+  // Handle vector comparisons separately.
   if (lex->getType()->isVectorType() || rex->getType()->isVectorType())
     return CheckVectorCompareOperands(lex, rex, Loc, isRelational);
 
@@ -5091,17 +5092,15 @@
   }
 
   // The result of comparisons is 'bool' in C++, 'int' in C.
-  QualType ResultTy = getLangOptions().CPlusPlus? Context.BoolTy :Context.IntTy;
+  QualType ResultTy = getLangOptions().CPlusPlus ? Context.BoolTy:Context.IntTy;
 
   if (isRelational) {
     if (lType->isRealType() && rType->isRealType())
       return ResultTy;
   } else {
     // Check for comparisons of floating point operands using != and ==.
-    if (lType->isFloatingType()) {
-      assert(rType->isFloatingType());
+    if (lType->isFloatingType() && rType->isFloatingType())
       CheckFloatComparison(Loc,lex,rex);
-    }
 
     if (lType->isArithmeticType() && rType->isArithmeticType())
       return ResultTy;