================
@@ -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;
----------------
higher-performance wrote:
I believe I actually saw other parts of the code doing this (which is what made
me try to do this), but sure.
https://github.com/llvm/llvm-project/pull/102040
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits