diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-02-16 21:30:01 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-02-16 21:30:01 +0000 |
| commit | ced903b793c1561fad92318f128461fd301e010e (patch) | |
| tree | cba557fc7d8fdf0cdb69ee6a1af1db880d197154 /clang/lib/Sema/SemaDeclObjC.cpp | |
| parent | 9018ca8df89bba37bc082143375f3688d3d59d22 (diff) | |
| download | bcm5719-llvm-ced903b793c1561fad92318f128461fd301e010e.tar.gz bcm5719-llvm-ced903b793c1561fad92318f128461fd301e010e.zip | |
warn about categories that implement deprecated interfaces.
llvm-svn: 64670
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 76a5c2c42a3..c3789508e14 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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; |

