================ @@ -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) { + S.Diag(Var->getLocation(), diag::warn_field_requires_explicit_init) + << true << Rec; ---------------- erichkeane wrote:
I don't doubt it :/ We've got quite a bit of 'uncleaned up' code around as we've learned the downsides of allowing things like this that have never caused a problem, so have never been cleaned up. 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