Warn instead of error on duplicate protocol definitions.
Be kind to so many projects which are doing this (and be
like gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68474 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 0103393..17de0a5 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -246,8 +246,7 @@
   if (PDecl) {
     // Protocol already seen. Better be a forward protocol declaration
     if (!PDecl->isForwardDecl()) {
-      PDecl->setInvalidDecl();
-      Diag(ProtocolLoc, diag::err_duplicate_protocol_def) << ProtocolName;
+      Diag(ProtocolLoc, diag::warn_duplicate_protocol_def) << ProtocolName;
       Diag(PDecl->getLocation(), diag::note_previous_definition);
       // Just return the protocol we already had.
       // FIXME: don't leak the objects passed in!