diff options
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 76a5c2c42a..c3789508e1 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -263,12 +263,7 @@ Sema::FindProtocolDeclaration(bool WarnOnDeclarations, continue; } - if (PDecl->getAttr<UnavailableAttr>()) - Diag(ProtocolId[i].second, diag::warn_unavailable) << - PDecl->getDeclName(); - if (PDecl->getAttr<DeprecatedAttr>()) - Diag(ProtocolId[i].second, diag::warn_deprecated) << - PDecl->getDeclName(); + DiagnoseUseOfDeprecatedDeclImpl(PDecl, ProtocolId[i].second); // If this is a forward declaration and we are supposed to warn in this // case, do it. @@ -489,6 +484,9 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, } CDecl->setClassInterface(IDecl); + + // If the interface is deprecated, warn about it. + DiagnoseUseOfDeprecatedDeclImpl(IDecl, ClassLoc); /// Check for duplicate interface declaration for this category ObjCCategoryDecl *CDeclChain; |