From 8e3b9db27fb1fae13fd326e67d3c88e6f5fc55aa Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Thu, 25 Feb 2010 18:24:33 +0000 Subject: Forgot to include nested protocols in collection, resulting in bogus warning. Fixes radar 7682116. llvm-svn: 97157 --- clang/lib/AST/ASTContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/AST/ASTContext.cpp') diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 202e3370b67..22871a4a681 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -945,9 +945,11 @@ void ASTContext::CollectInheritedProtocols(const Decl *CDecl, ObjCProtocolDecl *Proto = (*P); Protocols.insert(Proto); for (ObjCProtocolDecl::protocol_iterator P = Proto->protocol_begin(), - PE = Proto->protocol_end(); P != PE; ++P) + PE = Proto->protocol_end(); P != PE; ++P) { + Protocols.insert(*P); CollectInheritedProtocols(*P, Protocols); } + } // Categories of this Interface. for (const ObjCCategoryDecl *CDeclChain = OI->getCategoryList(); -- cgit v1.2.3