fix PR4021, array and functions decay in the receiver position of an objc message send.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70373 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/message.m b/test/SemaObjC/message.m
index 94db014..7b6a4ee 100644
--- a/test/SemaObjC/message.m
+++ b/test/SemaObjC/message.m
@@ -1,5 +1,10 @@
 // RUN: clang-cc -fsyntax-only -verify %s
 
+typedef struct objc_object {
+  Class isa;
+} *id;
+
+
 @interface foo
 - (void)meth;
 @end
@@ -86,5 +91,10 @@
   int b = [S somemsg];  // expected-error {{bad receiver type 'struct S'}}
 }
 
-
+// PR4021
+void foo4() {
+  struct objc_object X[10];
+  
+  [X rect];
+}