rdar://6827200 - [sema] reject statically allocated arrays of interface types

Upgrade "array of interface" warning to an error.  In addition to being a
terrible idea, this crashes codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 5df0aec..6f9818f 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -487,7 +487,8 @@
     if (EltTy->getDecl()->hasFlexibleArrayMember())
       Diag(Loc, diag::ext_flexible_array_in_array) << T;
   } else if (T->isObjCInterfaceType()) {
-    Diag(Loc, diag::warn_objc_array_of_interfaces) << T;
+    Diag(Loc, diag::err_objc_array_of_interfaces) << T;
+    return QualType();
   }
       
   // C99 6.7.5.2p1: The size expression shall have integer type.