Index: lib/Sema/SemaExprMember.cpp =================================================================== --- lib/Sema/SemaExprMember.cpp +++ lib/Sema/SemaExprMember.cpp @@ -1490,9 +1490,6 @@ } if (ObjCMethodDecl *OMD = dyn_cast(PMDecl)) { - // Check the use of this method. - if (S.DiagnoseUseOfDecl(OMD, MemberLoc)) - return ExprError(); Selector SetterSel = SelectorTable::constructSetterSelector(S.PP.getIdentifierTable(), S.PP.getSelectorTable(), Index: test/SemaObjC/property-deprecated-warning.m =================================================================== --- test/SemaObjC/property-deprecated-warning.m +++ test/SemaObjC/property-deprecated-warning.m @@ -167,3 +167,14 @@ foo.x = foo.x; // expected-error {{property access is using 'x' method which is unavailable}} \ // expected-warning {{property access is using 'setX:' method which is deprecated}} } + +// test implicit property does not emit duplicated warning. +@protocol Foo +- (int)size __attribute__((availability(ios,deprecated=3.0))); // expected-note {{'size' has been explicitly marked deprecated here}} +- (void)setSize: (int)x __attribute__((availability(ios,deprecated=2.0))); // expected-note {{'setSize:' has been explicitly marked deprecated here}} +@end + +void testImplicitProperty(id object) { + object.size = object.size; // expected-warning {{'size' is deprecated: first deprecated in iOS 3.0}} \ + // expected-warning {{'setSize:' is deprecated: first deprecated in iOS 2.0}} +}