================ @@ -2363,8 +2356,11 @@ void InitListChecker::CheckStructUnionTypes( } // Emit warnings for missing struct field initializers. - if (!VerifyOnly && InitializedSomething && CheckForMissingFields && - !RD->isUnion()) { + // This check is disabled for designated initializers in C. + // This matches gcc behaviour. + if (!VerifyOnly && InitializedSomething && !RD->isUnion() && + !IList->isIdiomaticZeroInitializer(SemaRef.getLangOpts()) && + !(HasDesignatedInit && !SemaRef.getLangOpts().CPlusPlus)) { ---------------- erichkeane wrote:
That one definitely helps... I was hoping they grouped better. But I guess if that is what we can get. Basically my issue is how difficult it was to deduce what I was looking at with all hte conditions. Perhaps Aaron has a suggestion. https://github.com/llvm/llvm-project/pull/81364 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits