[clang] [clang-tools-extra] [llvm] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 6 13:55:25 PST 2023


================
@@ -465,7 +460,8 @@ class InitListChecker {
   void FillInEmptyInitForField(unsigned Init, FieldDecl *Field,
                                const InitializedEntity &ParentEntity,
                                InitListExpr *ILE, bool &RequiresSecondPass,
-                               bool FillWithNoInit = false);
+                               bool FillWithNoInit = false,
+                               bool MaybeEmitMFIWarning = true);
----------------
zygoloid wrote:

This is not an initialism that we can expect future readers of the code to understand. If you want to keep this short, how about something like `WarnIfMissing`?

https://github.com/llvm/llvm-project/pull/70829


More information about the cfe-commits mailing list