Fix block comparisons.  Radar 6732116.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68171 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index cede0e5..bdc7e44 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -2701,9 +2701,9 @@
   const FunctionType *rbase = rhs->getAsFunctionType();
   const FunctionProtoType *lproto = dyn_cast<FunctionProtoType>(lbase);
   const FunctionProtoType *rproto = dyn_cast<FunctionProtoType>(rbase);
-  if (lproto && rproto)
-    return !mergeTypes(lhs, rhs).isNull();
-  return false;
+  if (lproto && rproto == 0)
+    return false;
+  return !mergeTypes(lhs, rhs).isNull();
 }
 
 /// areCompatVectorTypes - Return true if the two specified vector types are