aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index cd1b979dcb..57bd8eab1e 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -147,6 +147,22 @@ ObjCIvarDecl *ObjCInterfaceDecl::lookupInstanceVariable(
return IV;
}
}
+ // look into continuation class.
+ for (ObjCCategoryDecl *Categories = ClassDecl->getCategoryList();
+ Categories; Categories = Categories->getNextClassCategory())
+ if (!Categories->getIdentifier()) {
+ for (ObjCInterfaceDecl::prop_iterator I = Categories->prop_begin(),
+ E = Categories->prop_end(); I != E; ++I) {
+ ObjCPropertyDecl *PDecl = (*I);
+ if (ObjCIvarDecl *IV = PDecl->getPropertyIvarDecl())
+ if (IV->getIdentifier() == ID) {
+ clsDeclared = ClassDecl;
+ return IV;
+ }
+ }
+ break;
+ }
+
ClassDecl = ClassDecl->getSuperClass();
}
return NULL;