Index: lib/Sema/SemaDeclObjC.cpp =================================================================== --- lib/Sema/SemaDeclObjC.cpp +++ lib/Sema/SemaDeclObjC.cpp @@ -1851,10 +1851,6 @@ // FIXME: PushOnScopeChains? CurContext->addDecl(CDecl); - // If the interface is deprecated/unavailable, warn/error about it. - if (IDecl) - DiagnoseUseOfDecl(IDecl, ClassLoc); - // If the interface has the objc_runtime_visible attribute, we // cannot implement a category for it. if (IDecl && IDecl->hasAttr()) { Index: test/SemaObjC/attr-deprecated.m =================================================================== --- test/SemaObjC/attr-deprecated.m +++ test/SemaObjC/attr-deprecated.m @@ -83,7 +83,7 @@ } -__attribute ((deprecated)) // expected-note 2 {{'DEPRECATED' has been explicitly marked deprecated here}} +__attribute ((deprecated)) // expected-note {{'DEPRECATED' has been explicitly marked deprecated here}} @interface DEPRECATED { @public int ivar; DEPRECATED *ivar2; // no warning. @@ -98,9 +98,17 @@ @end @interface DEPRECATED (Category2) // no warning. +- (id)meth; @end -@implementation DEPRECATED (Category2) // expected-warning {{'DEPRECATED' is deprecated}} +__attribute__((deprecated)) +void depr_function(); + +@implementation DEPRECATED (Category2) // no warning +- (id)meth { + depr_function(); // no warning. + return 0; +} @end @interface NS : DEPRECATED // expected-warning {{'DEPRECATED' is deprecated}} Index: test/SemaObjC/class-unavail-warning.m =================================================================== --- test/SemaObjC/class-unavail-warning.m +++ test/SemaObjC/class-unavail-warning.m @@ -2,7 +2,7 @@ // rdar://9092208 __attribute__((unavailable("not available"))) -@interface MyClass { // expected-note 8 {{'MyClass' has been explicitly marked unavailable here}} +@interface MyClass { // expected-note 7 {{'MyClass' has been explicitly marked unavailable here}} @public void *_test; MyClass *ivar; // no error. @@ -28,7 +28,7 @@ @interface MyClass (Cat2) // no error. @end -@implementation MyClass (Cat2) // expected-error {{unavailable}} +@implementation MyClass (Cat2) // no error. @end int main() { Index: test/SemaObjC/warn-deprecated-implementations.m =================================================================== --- test/SemaObjC/warn-deprecated-implementations.m +++ test/SemaObjC/warn-deprecated-implementations.m @@ -28,15 +28,14 @@ - (void) G {} // No warning, implementing its own deprecated method @end -__attribute__((deprecated)) // expected-note 2 {{'CL' has been explicitly marked deprecated here}} +__attribute__((deprecated)) // expected-note {{'CL' has been explicitly marked deprecated here}} @interface CL // expected-note 2 {{class declared here}} @end @implementation CL // expected-warning {{Implementing deprecated class}} @end -@implementation CL ( SomeCategory ) // expected-warning {{'CL' is deprecated}} \ - // expected-warning {{Implementing deprecated category}} +@implementation CL (SomeCategory) // expected-warning {{Implementing deprecated category}} @end @interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}