diff options
author | Steve Naroff <snaroff@apple.com> | 2008-06-04 04:46:04 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-06-04 04:46:04 +0000 |
commit | 6c930f2ac0af05a120a39cb780b50d4a293abdfc (patch) | |
tree | 601d48f230d0c21e8d83246763beef8431f3f588 /lib/AST/DeclObjC.cpp | |
parent | e6fe5d46b26f407d78d1f12ece9cb103e4d19b82 (diff) |
Make sure we look through categories when searching for a classes property.
Fixes <rdar://problem/5984338> clang on xcode: property implementation must have its declaration in interface 'PBXOpenQuicklyModule'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 701ad353a3..e493d27ac3 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -150,6 +150,13 @@ ObjCPropertyDecl * if (property->getIdentifier() == PropertyId) return property; } + // Look through categories. + for (ObjCCategoryDecl *Category = getCategoryList(); + Category; Category = Category->getNextClassCategory()) { + ObjCPropertyDecl *property = Category->FindPropertyDeclaration(PropertyId); + if (property) + return property; + } if (getSuperClass()) return getSuperClass()->FindPropertyDeclaration(PropertyId); return 0; |