aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 121ed8cbb5..c507ab7007 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -127,6 +127,7 @@ CheckPropertyAgainstProtocol(Sema &S, ObjCPropertyDecl *Prop,
for (unsigned I = 0, N = R.size(); I != N; ++I) {
if (ObjCPropertyDecl *ProtoProp = dyn_cast<ObjCPropertyDecl>(R[I])) {
S.DiagnosePropertyMismatch(Prop, ProtoProp, Proto->getIdentifier());
+ S.mergeDeclAttributes(Prop, ProtoProp, Sema::AMK_Override);
return;
}
}
@@ -209,6 +210,7 @@ Decl *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc,
for (unsigned I = 0, N = R.size(); I != N; ++I) {
if (ObjCPropertyDecl *SuperProp = dyn_cast<ObjCPropertyDecl>(R[I])) {
DiagnosePropertyMismatch(Res, SuperProp, Super->getIdentifier());
+ mergeDeclAttributes(Res, SuperProp, AMK_Override);
FoundInSuper = true;
break;
}