summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2016-01-28 18:49:28 +0000
committerManman Ren <manman.ren@gmail.com>2016-01-28 18:49:28 +0000
commit5b786407d04263c67cc864c4aa184e07e1f74a85 (patch)
treedbd6b02f8c73de379ca81dd8a05ca9ad1820d55c /clang/tools/libclang/CIndex.cpp
parent64cfffd333b261ebb68a6ee04b09cc42d32c1992 (diff)
downloadbcm5719-llvm-5b786407d04263c67cc864c4aa184e07e1f74a85.tar.gz
bcm5719-llvm-5b786407d04263c67cc864c4aa184e07e1f74a85.zip
Class Property: class property and instance property can have the same name.
Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name of the property: ObjCPropertyDecl::findPropertyDecl, ObjCContainerDecl::FindPropertyDeclaration, ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass, ObjCImplDecl::FindPropertyImplDecl, and Sema::ActOnPropertyImplDecl. ObjCPropertyQueryKind currently has 3 values: OBJC_PR_query_unknown, OBJC_PR_query_instance, OBJC_PR_query_class This extra parameter specifies that we are looking for an instance property with the given name, or a class property with the given name, or any property with the given name (if both exist, the instance property will be returned). rdar://23891898 llvm-svn: 259070
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r--clang/tools/libclang/CIndex.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 6f1b366aa30..b2a9ab88e91 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -1077,7 +1077,8 @@ bool CursorVisitor::VisitObjCPropertyDecl(ObjCPropertyDecl *PD) {
IdentifierInfo *PropertyId = PD->getIdentifier();
ObjCPropertyDecl *prevDecl =
- ObjCPropertyDecl::findPropertyDecl(cast<DeclContext>(ID), PropertyId);
+ ObjCPropertyDecl::findPropertyDecl(cast<DeclContext>(ID), PropertyId,
+ PD->getQueryKind());
if (!prevDecl)
return false;
OpenPOWER on IntegriCloud