r178743 - Revert r177948. We decided that we do not want ObjC property redeclarations to inherit "deprecated".
Ted Kremenek
kremenek at apple.com
Wed Apr 3 22:29:15 PDT 2013
Author: kremenek
Date: Thu Apr 4 00:29:15 2013
New Revision: 178743
URL: http://llvm.org/viewvc/llvm-project?rev=178743&view=rev
Log:
Revert r177948. We decided that we do not want ObjC property redeclarations to inherit "deprecated".
Removed:
cfe/trunk/test/SemaObjC/property-inherited-availability-attr.m
Modified:
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=178743&r1=178742&r2=178743&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Thu Apr 4 00:29:15 2013
@@ -127,7 +127,6 @@ CheckPropertyAgainstProtocol(Sema &S, Ob
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;
}
}
@@ -210,7 +209,6 @@ Decl *Sema::ActOnProperty(Scope *S, Sour
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;
}
Removed: cfe/trunk/test/SemaObjC/property-inherited-availability-attr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-inherited-availability-attr.m?rev=178742&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjC/property-inherited-availability-attr.m (original)
+++ cfe/trunk/test/SemaObjC/property-inherited-availability-attr.m (removed)
@@ -1,34 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx10.8.0 -fsyntax-only -verify %s
-// rdar://13467644
-
- at interface NSObject @end
- at protocol myProtocol
- at property int myProtocolProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8)));
- at end
-
- at interface Foo : NSObject
- at property int myProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{'myProperty' declared here}} \
- // expected-note {{method 'myProperty' declared here}} \
- // expected-note {{property 'myProperty' is declared deprecated here}}
- at end
-
- at interface Bar : Foo <myProtocol>
- at property int myProperty; // expected-note {{'myProperty' declared here}} \
- // expected-note {{method 'myProperty' declared here}} \
- // expected-note {{property 'myProperty' is declared deprecated here}}
- at property int myProtocolProperty; // expected-note {{'myProtocolProperty' declared here}} \
- // expected-note {{method 'myProtocolProperty' declared here}} \
- // expected-note {{property 'myProtocolProperty' is declared deprecated here}}
- at end
-
-void test(Foo *y, Bar *x) {
- y.myProperty = 0; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}}
- [y myProperty]; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}}
-
- x.myProperty = 1; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}}
- [x myProperty]; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}}
-
- x.myProtocolProperty = 0; // expected-warning {{'myProtocolProperty' is deprecated: first deprecated in OS X 10.8}}
-
- [x myProtocolProperty]; // expected-warning {{'myProtocolProperty' is deprecated: first deprecated in OS X 10.8}}
-}
More information about the cfe-commits
mailing list