Fixed a bug reported by Chris, involving assiging 0 to a qualified object type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45542 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 0778bbd..6c9d8ba 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -1174,7 +1174,8 @@
 Sema::CheckSingleAssignmentConstraints(QualType lhsType, Expr *&rExpr) {
   // C99 6.5.16.1p1: the left operand is a pointer and the right is
   // a null pointer constant.
-  if (lhsType->isPointerType() && rExpr->isNullPointerConstant(Context)) {
+  if ((lhsType->isPointerType() || lhsType->isObjcQualifiedIdType()) 
+      && rExpr->isNullPointerConstant(Context)) {
     promoteExprToType(rExpr, lhsType);
     return Compatible;
   }