Index: clang/lib/Sema/SemaInit.cpp =================================================================== --- clang/lib/Sema/SemaInit.cpp +++ clang/lib/Sema/SemaInit.cpp @@ -9130,6 +9130,7 @@ Expr *E = ListInit->getInit(0); auto *RD = E->getType()->getAsCXXRecordDecl(); if (!isa(E) && RD && + isCompleteType(Kind.getLocation(), E->getType()) && isOrIsDerivedFromSpecializationOf(RD, Template)) TryListConstructors = false; } Index: clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp =================================================================== --- clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp +++ clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp @@ -348,6 +348,31 @@ }; } +namespace rdar41903969 { +template struct A {}; +template struct B; +template struct C { + C(A&); + C(B&); +}; + +void foo(A &a, B &b) { + (void)C{b}; + (void)C{a}; +} + +template struct X { + X(std::initializer_list) = delete; + X(const X&); +}; + +template struct D : X {}; + +void bar(D& d) { + (void)X{d}; +} +} + #else // expected-no-diagnostics