change function name in my last patch.
// rdar://12103400
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162320 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index a8726cb..e465cd6 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -241,7 +241,7 @@
}
-static unsigned getMemoryModel(unsigned attr) {
+static unsigned getOwnershipRule(unsigned attr) {
return attr & (ObjCPropertyDecl::OBJC_PR_assign |
ObjCPropertyDecl::OBJC_PR_retain |
ObjCPropertyDecl::OBJC_PR_copy |
@@ -357,8 +357,8 @@
unsigned PIkind = PIDecl->getPropertyAttributesAsWritten();
if (isReadWrite && (PIkind & ObjCPropertyDecl::OBJC_PR_readonly)) {
PIkind |= deduceWeakPropertyFromType(*this, PIDecl->getType());
- unsigned ClassExtensionMemoryModel = getMemoryModel(Attributes);
- unsigned PrimaryClassMemoryModel = getMemoryModel(PIkind);
+ unsigned ClassExtensionMemoryModel = getOwnershipRule(Attributes);
+ unsigned PrimaryClassMemoryModel = getOwnershipRule(PIkind);
if (PrimaryClassMemoryModel && ClassExtensionMemoryModel &&
(PrimaryClassMemoryModel != ClassExtensionMemoryModel)) {
Diag(AtLoc, diag::warn_property_attr_mismatch);