Reverse a partial fix patch for radar 7214820. It broke some code and
I don't have time to refix it for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95733 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index c9d85c8..7912a93 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -4311,24 +4311,11 @@
   bool allRTypes = true;
 
   // Check return type
-  QualType LRES = lbase->getResultType();
-  QualType RRES = rbase->getResultType();
-  Qualifiers::GC GC_L = LRES.getObjCGCAttr();
-  Qualifiers::GC GC_R = RRES.getObjCGCAttr();
-  // __weak/__strong attribute on one function/block return type but
-  // not the other is OK.
-  if (GC_L != GC_R) {
-    if (GC_R == Qualifiers::GCNone)
-      RRES = getObjCGCQualType(RRES, GC_L);
-    else if (GC_L == Qualifiers::GCNone)
-      LRES = getObjCGCQualType(LRES, GC_R);
-  }
-  
-  QualType retType = mergeTypes(LRES, RRES);
+  QualType retType = mergeTypes(lbase->getResultType(), rbase->getResultType());
   if (retType.isNull()) return QualType();
-  if (getCanonicalType(retType) != getCanonicalType(LRES))
+  if (getCanonicalType(retType) != getCanonicalType(lbase->getResultType()))
     allLTypes = false;
-  if (getCanonicalType(retType) != getCanonicalType(RRES))
+  if (getCanonicalType(retType) != getCanonicalType(rbase->getResultType()))
     allRTypes = false;
   // FIXME: double check this
   bool NoReturn = lbase->getNoReturnAttr() || rbase->getNoReturnAttr();