summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.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/lib/Sema/SemaLookup.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/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 45dc2e33da9..f28cd27e85c 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -4207,7 +4207,8 @@ static void LookupPotentialTypoResult(Sema &SemaRef,
}
}
- if (ObjCPropertyDecl *Prop = Class->FindPropertyDeclaration(Name)) {
+ if (ObjCPropertyDecl *Prop = Class->FindPropertyDeclaration(
+ Name, ObjCPropertyQueryKind::OBJC_PR_query_instance)) {
Res.addDecl(Prop);
Res.resolveKind();
return;
OpenPOWER on IntegriCloud