Teach ASTContext::tagTypesAreCompatible() about the built-in ObjC types (Class and id), removing a bogus warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43809 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp
index ef444b4..6699368 100644
--- a/AST/ASTContext.cpp
+++ b/AST/ASTContext.cpp
@@ -1182,6 +1182,10 @@
     if (ldecl->getIdentifier() == rdecl->getIdentifier())
       return true;
   }
+  // "Class" and "id" are compatible built-in structure types.
+  if (isObjcIdType(lhs) && isObjcClassType(rhs) ||
+      isObjcClassType(lhs) && isObjcIdType(rhs))
+    return true;
   return false;
 }