Complain when we try to initialize an object of Objective-C class type
(which is ill-formed) with an initializer list. Also, change the
fallback from an assertion to a generic error message, which is far
friendlier. Fixes <rdar://problem/7730948>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102930 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/compound-init.m b/test/SemaObjC/compound-init.m
new file mode 100644
index 0000000..7b288bb
--- /dev/null
+++ b/test/SemaObjC/compound-init.m
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+@interface A
+@end
+
+void f() {
+  (A){ 0 }; // expected-error{{cannot initialize Objective-C class type 'A'}}
+}