summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-11-20 17:24:03 +0000
committerTed Kremenek <kremenek@apple.com>2013-11-20 17:24:03 +0000
commitcb42dbe7ad2cd1a9376c25cbd744f7c12f4f46a6 (patch)
tree539a1fb1214038a8428205dda7617d8ff571fe30 /clang/lib/Sema/SemaExpr.cpp
parent3cfa97397810aa4d7d25030ff29bf9e9f15dcff3 (diff)
downloadbcm5719-llvm-cb42dbe7ad2cd1a9376c25cbd744f7c12f4f46a6.tar.gz
bcm5719-llvm-cb42dbe7ad2cd1a9376c25cbd744f7c12f4f46a6.zip
Refine 'deprecated' checking for Objective-C classes/methods.
- If a deprecated class refers to another deprecated class, do not warn. - @implementations of a deprecated class can refer to other deprecated things. Fixes <rdar://problem/15407366> and <rdar://problem/15466783>. llvm-svn: 195259
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 22242a5acc9..26c81ef552c 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -111,7 +111,8 @@ static AvailabilityResult DiagnoseAvailabilityOfDecl(Sema &S,
break;
case AR_Deprecated:
- S.EmitDeprecationWarning(D, Message, Loc, UnknownObjCClass, ObjCPDecl);
+ if (S.getCurContextAvailability() != AR_Deprecated)
+ S.EmitDeprecationWarning(D, Message, Loc, UnknownObjCClass, ObjCPDecl);
break;
case AR_Unavailable:
OpenPOWER on IntegriCloud