diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-06 23:43:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-06 23:43:32 +0000 |
commit | e2573e529d8630e1586e8fb1230938d6e1d799e5 (patch) | |
tree | 8b793caf97586f21d51a97a70e889aa98bccc6e5 /lib | |
parent | 14856d7b7a2be05ae9a0fd5b2073631994c2ba43 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 0103393ddc..17de0a5067 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -246,8 +246,7 @@ Sema::ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, 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! |