Proper checking of list-initializers for array new expressions.

This finishes generalized initializer support in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150688 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/new-delete-cxx0x.cpp b/test/SemaCXX/new-delete-cxx0x.cpp
index 87780ad..c404fab 100644
--- a/test/SemaCXX/new-delete-cxx0x.cpp
+++ b/test/SemaCXX/new-delete-cxx0x.cpp
@@ -7,3 +7,20 @@
   (void)new int[-1]; // expected-warning {{array size is negative}}
   (void)new int[2000000000]; // expected-warning {{array is too large}}
 }
+
+
+struct S {
+  S(int);
+  S();
+  ~S();
+};
+
+struct T { // expected-note 2 {{not viable}}
+  T(int); // expected-note {{not viable}}
+};
+
+void fn() {
+  (void) new int[2] {1, 2};
+  (void) new S[2] {1, 2};
+  (void) new T[2] {1, 2}; // expected-error {{no matching constructor}}
+}