aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-12-01 01:07:24 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-12-01 01:07:24 +0000
commit2600503170c8366af2587408c50e2beedee5d1f1 (patch)
treec0356491a37bbbc2082038507a5bdfc7b8b09f2d /lib/Sema/SemaExprObjC.cpp
parentd9e0ff273f75de13bd97641a5b77651940946271 (diff)
When unknown method is sent to a receiver of
'Class' type, disgnostic should refere to a class method. Fixes // rdar://8592156 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 04b88e2bde..047236b1bd 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -1075,7 +1075,9 @@ ExprResult Sema::BuildInstanceMessage(Expr *Receiver,
Expr **Args = reinterpret_cast<Expr **>(ArgsIn.release());
QualType ReturnType;
ExprValueKind VK = VK_RValue;
- if (CheckMessageArgumentTypes(Args, NumArgs, Sel, Method, false,
+ bool ClassMessage = (ReceiverType->isObjCClassType() ||
+ ReceiverType->isObjCQualifiedClassType());
+ if (CheckMessageArgumentTypes(Args, NumArgs, Sel, Method, ClassMessage,
LBracLoc, RBracLoc, ReturnType, VK))
return ExprError();