================ @@ -6457,6 +6472,18 @@ void InitializationSequence::InitializeFrom(Sema &S, } } + if (!S.getLangOpts().CPlusPlus && + Kind.getKind() == InitializationKind::IK_Default) { + RecordDecl *Rec = DestType->getAsRecordDecl(); + if (Rec && Rec->hasUninitializedExplicitInitFields()) { + VarDecl *Var = dyn_cast_or_null<VarDecl>(Entity.getDecl()); + if (Var && !Initializer) { ---------------- higher-performance wrote:
> What is the `VarDecl` here? Again, we have access to the record-decl, so why > can't we get the field name here? The `VarDecl` isn't the field within the class. It's the default-initialized variable that's missing the field initialization. We don't know which field is missing (again, per above). 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