P1008R1 Classes with user-declared constructors are never aggregates in
C++20.

llvm-svn: 343131
diff --git a/clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp b/clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp
new file mode 100644
index 0000000..9c438d3
--- /dev/null
+++ b/clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -std=c++2a %s -verify
+
+namespace class_with_ctor {
+  struct A { // expected-note 6{{candidate}}
+    A() = default; // expected-note 3{{candidate}}
+    int x;
+    int y;
+  };
+  A a = {1, 2}; // expected-error {{no matching constructor}}
+
+  struct B {
+    int x;
+    int y;
+  };
+  B b1 = B(); // trigger declaration of implicit ctors
+  B b2 = {1, 2}; // ok
+
+  struct C : A {
+    A a;
+  };
+  C c1 = {{}, {}}; // ok, call default ctor twice
+  C c2 = {{1, 2}, {3, 4}}; // expected-error 2{{no matching constructor}}
+}