summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
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