================
@@ -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 &&
----------------
higher-performance wrote:

> how do we know that a field marked with the attribute wasn't initialized here?

Because of the `&& DestRecordDecl->hasUninitializedExplicitInitFields()` 
conditions a couple of lines below.

> Also, we have `DestRecordDecl`, so we have access to the `FieldDecls` 
> associated with it, right?

It might not be in the class itself; it could be in a subobject, etc.

Trying to dig up the exact field is complicated and slow.

https://github.com/llvm/llvm-project/pull/102040
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to