More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45244 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 846c529..e720c2e 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -1399,6 +1399,11 @@
     promoteExprToType(rex, lType); // promote the pointer to pointer
     return Context.IntTy;
   }
+  if ((lType->isObjcQualifiedIdType() || rType->isObjcQualifiedIdType())
+      && Context.ObjcQualifiedIdTypesAreCompatible(lType, rType)) {
+    promoteExprToType(rex, lType); 
+    return Context.IntTy;
+  }
   if (lType->isPointerType() && rType->isIntegerType()) {
     if (!RHSIsNull)
       Diag(loc, diag::ext_typecheck_comparison_of_pointer_integer,