Index: lib/Sema/TreeTransform.h =================================================================== --- lib/Sema/TreeTransform.h +++ lib/Sema/TreeTransform.h @@ -7730,7 +7730,7 @@ template ExprResult TreeTransform::TransformOpaqueValueExpr(OpaqueValueExpr *E) { - assert(getDerived().AlreadyTransformed(E->getType()) && + assert((!E->getSourceExpr() || getDerived().AlreadyTransformed(E->getType())) && "opaque value expression requires transformation"); return E; } Index: test/SemaTemplate/default-arguments.cpp =================================================================== --- test/SemaTemplate/default-arguments.cpp +++ test/SemaTemplate/default-arguments.cpp @@ -159,3 +159,9 @@ int g() { X::f(0); } // expected-note {{in instantiation of template class 'DR1635::X' requested here}} } + +template +struct C { + C(T t = ); // expected-error {{expected expression}} +}; +C obj;