warn about interfaces that inherit from deprecated classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64671 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index c378950..b82c50a 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -108,6 +108,11 @@
 
     ObjCInterfaceDecl *SuperClassDecl = 
                                   dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl);
+
+    // Diagnose classes that inherit from deprecated classes.
+    if (SuperClassDecl)
+      DiagnoseUseOfDeprecatedDeclImpl(SuperClassDecl, SuperLoc);
+    
     if (PrevDecl && SuperClassDecl == 0) {
       // The previous declaration was not a class decl. Check if we have a
       // typedef. If we do, get the underlying class type.
@@ -118,6 +123,7 @@
             SuperClassDecl = dyn_cast<ObjCInterfaceDecl>(IDecl);
         }
       }
+      
       // This handles the following case:
       //
       // typedef int SuperClass;
@@ -128,6 +134,7 @@
         Diag(PrevDecl->getLocation(), diag::note_previous_definition);
       }
     }
+    
     if (!dyn_cast_or_null<TypedefDecl>(PrevDecl)) {
       if (!SuperClassDecl)
         Diag(SuperLoc, diag::err_undef_superclass)