aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-12-07 00:30:00 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-12-07 00:30:00 +0000
commitb76a97e91dc4bea0b6b3da06c84e02f50cd351d3 (patch)
tree943d7f63c900ccaca5195f0e67f859ec45a087af /lib/Sema/SemaExprObjC.cpp
parent0e35b4ecee380c2b4c33d75da6bc2fb6f6bc7df3 (diff)
objc: issue deprecated/unavailable diagnostic when
methods with these attributes are sent to receivers of 'id' type too. // rdar://10459930 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index cc17e6b890..fbae96071e 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -1254,6 +1254,9 @@ ExprResult Sema::BuildInstanceMessage(Expr *Receiver,
Method = LookupFactoryMethodInGlobalPool(Sel,
SourceRange(LBracLoc, RBracLoc),
receiverIsId);
+ if (Method)
+ DiagnoseAvailabilityOfDecl(Method, Loc, 0);
+
} else if (ReceiverType->isObjCClassType() ||
ReceiverType->isObjCQualifiedClassType()) {
// Handle messages to Class.