================
@@ -4561,6 +4569,13 @@ static void TryConstructorInitialization(Sema &S,
CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function);
if (Result != OR_Deleted) {
+ if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default &&
----------------
erichkeane wrote:
>Because of the && DestRecordDecl->hasUninitializedExplicitInitFields()
>conditions a couple of lines below.
Right, but that is a property of the declaration 'elsewhere', not the
initialization of the type here. We actually shouldn't be storing that
initialization on the `RecordDecl` itself, that should be immutable once we
see the semicolon.
>Trying to dig up the exact field is complicated and slow.
Complicated? Perhaps somewhat. `slow` is usually OK for the purposes of
diagnostics, it seems to be sensible here, IMO.
https://github.com/llvm/llvm-project/pull/102040
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits