diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-03-15 20:11:46 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-03-15 20:11:46 +0000 |
commit | 9f550ff05d496e6b9480e5619a21d9da0c9e27c1 (patch) | |
tree | acd9c2a2e3de8030360fe8c5ed64ca764743be5a /lib/AST/DeclObjC.cpp | |
parent | b5696fecb32744e1cd11dc064d8179717c22020e (diff) |
Make 'findPropertyDecl()' a static method of ObjCPropertyDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index c94a551ae2..597b0d1bf0 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -89,6 +89,19 @@ ObjCContainerDecl::getMethod(Selector Sel, bool isInstance) const { return 0; } +ObjCPropertyDecl * +ObjCPropertyDecl::findPropertyDecl(DeclContext *DC, + IdentifierInfo *propertyID) { + + DeclContext::lookup_iterator I, E; + llvm::tie(I, E) = DC->lookup(propertyID); + for ( ; I != E; ++I) + if (ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(*I)) + return PD; + + return 0; +} + /// FindPropertyDeclaration - Finds declaration of the property given its name /// in 'PropertyId' and returns it. It returns 0, if not found. /// FIXME: Convert to DeclContext lookup... |