Patch to do type-checking for objctive-c's object types.
More is yet to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45263 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDeclObjC.cpp b/Sema/SemaDeclObjC.cpp
index 3f95968..a044f2e 100644
--- a/Sema/SemaDeclObjC.cpp
+++ b/Sema/SemaDeclObjC.cpp
@@ -135,7 +135,7 @@
         Diag(ClassLoc, diag::warn_undef_protocolref,
              ProtocolNames[i]->getName(),
              ClassName->getName());
-      IDecl->setIntfRefProtocols((int)i, RefPDecl);
+      IDecl->setIntfRefProtocols(i, RefPDecl);
     }
     IDecl->setLocEnd(EndProtoLoc);
   }
@@ -216,7 +216,7 @@
         Diag(ProtocolLoc, diag::warn_undef_protocolref,
              ProtoRefNames[i]->getName(),
              ProtocolName->getName());
-      PDecl->setReferencedProtocols((int)i, RefPDecl);
+      PDecl->setReferencedProtocols(i, RefPDecl);
     }
     PDecl->setLocEnd(EndProtoLoc);
   }
@@ -300,7 +300,7 @@
              ProtoRefNames[i]->getName(),
              CategoryName->getName());
       }
-      CDecl->setCatReferencedProtocols((int)i, RefPDecl);
+      CDecl->setCatReferencedProtocols(i, RefPDecl);
     }
     CDecl->setLocEnd(EndProtoLoc);
   }
@@ -481,7 +481,7 @@
   }
   // Check on this protocols's referenced protocols, recursively
   ObjcProtocolDecl** RefPDecl = PDecl->getReferencedProtocols();
-  for (int i = 0; i < PDecl->getNumReferencedProtocols(); i++)
+  for (unsigned i = 0; i < PDecl->getNumReferencedProtocols(); i++)
     CheckProtocolMethodDefs(RefPDecl[i], IncompleteImpl, InsMap, ClsMap);
 }
 
@@ -521,7 +521,7 @@
   // Check the protocol list for unimplemented methods in the @implementation
   // class.
   ObjcProtocolDecl** protocols = IDecl->getReferencedProtocols();
-  for (int i = 0; i < IDecl->getNumIntfRefProtocols(); i++)
+  for (unsigned i = 0; i < IDecl->getNumIntfRefProtocols(); i++)
     CheckProtocolMethodDefs(protocols[i], IncompleteImpl, InsMap, ClsMap);
 
   if (IncompleteImpl)
@@ -567,7 +567,7 @@
   // Check the protocol list for unimplemented methods in the @implementation
   // class.
   ObjcProtocolDecl** protocols = CatClassDecl->getReferencedProtocols();
-  for (int i = 0; i < CatClassDecl->getNumReferencedProtocols(); i++) {
+  for (unsigned i = 0; i < CatClassDecl->getNumReferencedProtocols(); i++) {
     ObjcProtocolDecl* PDecl = protocols[i];
     CheckProtocolMethodDefs(PDecl, IncompleteImpl, InsMap, ClsMap);
   }