From e4fd640147b0cc062da4f31ccfaf32bff4852082 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 1 Apr 2009 23:23:53 +0000 Subject: Fix a bug in declaration of property in continuation class which was exposed by implementation of objc2's nonfragile abi code gen. llvm-svn: 68259 --- clang/lib/AST/DeclObjC.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'clang/lib/AST/DeclObjC.cpp') diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index 57bd8eab1ef..f2e0b791fdd 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -91,6 +91,16 @@ ObjCContainerDecl::FindPropertyDeclaration(IdentifierInfo *PropertyId) const { for (prop_iterator I = prop_begin(), E = prop_end(); I != E; ++I) if ((*I)->getIdentifier() == PropertyId) return *I; + // Also look for property declared in its continuation class. + if (const ObjCInterfaceDecl *OID = dyn_cast(this)) + for (ObjCCategoryDecl *Categories = OID->getCategoryList(); + Categories; Categories = Categories->getNextClassCategory()) + if (!Categories->getIdentifier()) { + for (ObjCInterfaceDecl::prop_iterator I = Categories->prop_begin(), + E = Categories->prop_end(); I != E; ++I) + if ((*I)->getIdentifier() == PropertyId) + return *I; + } const ObjCProtocolDecl *PID = dyn_cast(this); if (PID) { -- cgit v1.2.3