Patch to check for ObjC's property type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61090 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 417803e..7b60594 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1437,6 +1437,10 @@
       }
     }
 
+  Type *t = T.getTypePtr();
+  if (t->isArrayType() || t->isFunctionType())
+    Diag(AtLoc, diag::err_property_type) << T;
+  
   ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, AtLoc, 
                                                      FD.D.getIdentifier(), T);
   // Regardless of setter/getter attribute, we save the default getter/setter