aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-08-10 18:10:50 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-08-10 18:10:50 +0000
commitba551983016ee3eac5421255d2ebe6723e61befb (patch)
tree66392fe173ad5ae13d2757ce9bb33965f6a961d5
parent79a79f5d323155ac99155c621a360ef8a68055a8 (diff)
Fix a spurious warning when message sent to qualified-id
type receiver (pr7861). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110696 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExprObjC.cpp3
-rw-r--r--test/SemaObjC/method-lookup-3.m5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index df970411e7..f718ea3fd9 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -863,8 +863,7 @@ Sema::OwningExprResult Sema::BuildInstanceMessage(ExprArg ReceiverE,
if (!Method) {
// Handle messages to id.
- bool receiverIsId = (ReceiverType->isObjCIdType() ||
- ReceiverType->isObjCQualifiedIdType());
+ bool receiverIsId = ReceiverType->isObjCIdType();
if (receiverIsId || ReceiverType->isBlockPointerType() ||
(Receiver && Context.isObjCNSObjectType(Receiver->getType()))) {
Method = LookupInstanceMethodInGlobalPool(Sel,
diff --git a/test/SemaObjC/method-lookup-3.m b/test/SemaObjC/method-lookup-3.m
index 18a9982840..882b3d1d21 100644
--- a/test/SemaObjC/method-lookup-3.m
+++ b/test/SemaObjC/method-lookup-3.m
@@ -50,3 +50,8 @@ void f4(id a0, Abstract *a1) {
void f5(id a0, Abstract *a1) {
[ a0 setZ: a1];
}
+
+// pr7861
+void f6(id<A> a0) {
+ Abstract *l = [a0 x];
+}