summaryrefslogtreecommitdiffstats
path: root/clang/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
commit6bdeb14d5d347b17c9bde8ab39c9d69b16a56a13 (patch)
treefca289267a31bbd33d2d86c578ef42ef8f43278e /clang/lib/Sema/SemaExprObjC.cpp
parent61e6d987bf9d1bf661ff6655536c307e2a24fd96 (diff)
downloadbcm5719-llvm-6bdeb14d5d347b17c9bde8ab39c9d69b16a56a13.tar.gz
bcm5719-llvm-6bdeb14d5d347b17c9bde8ab39c9d69b16a56a13.zip
objc: issue deprecated/unavailable diagnostic when
methods with these attributes are sent to receivers of 'id' type too. // rdar://10459930 llvm-svn: 145999
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index cc17e6b890d..fbae96071e3 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud