diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-01-17 00:38:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-01-17 00:38:46 +0000 |
commit | 0f9b9f37941ea709104f02d7dbe4ea18ab457605 (patch) | |
tree | 2837cbad5c61aa2fda0f8740cd5a174cec530b3b /lib/Sema/SemaDeclObjC.cpp | |
parent | a6f97071338e525d18e607ca286e338639dd2a5e (diff) |
Treat hidden Objective-C protocol definitions as if they were
undefined, and don't find methods or protocols within those protocol
definitions. This completes <rdar://problem/10634711>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 54cf1c2626..0ffdceb2ee 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -743,7 +743,9 @@ Sema::FindProtocolDeclaration(bool WarnOnDeclarations, // If this is a forward declaration and we are supposed to warn in this // case, do it. - if (WarnOnDeclarations && !PDecl->hasDefinition()) + // FIXME: Recover nicely in the hidden case. + if (WarnOnDeclarations && + (!PDecl->hasDefinition() || PDecl->getDefinition()->isHidden())) Diag(ProtocolId[i].second, diag::warn_undef_protocolref) << ProtocolId[i].first; Protocols.push_back(PDecl); |