error on property of objc interface type instead of crashing


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78826 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 18536af..75ac336 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1940,6 +1940,8 @@
               Diag(AtLoc, diag::warn_implements_nscopying)  
                 << FD.D.getIdentifier();
       }
+  if (T->isObjCInterfaceType())
+    Diag(FD.D.getIdentifierLoc(), diag::err_statically_allocated_object);
   
   DeclContext *DC = dyn_cast<DeclContext>(ClassDecl);
   assert(DC && "ClassDecl is not a DeclContext");