summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-04-01 23:23:53 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-04-01 23:23:53 +0000
commite4fd640147b0cc062da4f31ccfaf32bff4852082 (patch)
treeafe94fccfcf02ee24849097478929181cbab0628 /clang/lib/AST/DeclObjC.cpp
parent66b3fffa6079a8f14b9809a50bb04f98d5e551d5 (diff)
downloadbcm5719-llvm-e4fd640147b0cc062da4f31ccfaf32bff4852082.tar.gz
bcm5719-llvm-e4fd640147b0cc062da4f31ccfaf32bff4852082.zip
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
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp10
1 files changed, 10 insertions, 0 deletions
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<ObjCInterfaceDecl>(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<ObjCProtocolDecl>(this);
if (PID) {
OpenPOWER on IntegriCloud