aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-16 21:30:01 +0000
committerChris Lattner <sabre@nondot.org>2009-02-16 21:30:01 +0000
commit16b34b416a68be507017051c211c90b246cd5066 (patch)
tree1007bf6c463a9fe6d25ecd6958caf4115a12d301 /lib/Sema/SemaDeclObjC.cpp
parent70f1954659b1c0e3e7675f0f688ee0f384846148 (diff)
warn about categories that implement deprecated interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp10
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;