zygoloid wrote:

Thanks for looking into this!

I wonder if it would make sense to move the checking for this warning here, to 
the `else` case in line 725:

https://github.com/llvm/llvm-project/blob/ac30780250875802d13450d17e6959f9e2ad3a70/clang/lib/Sema/SemaInit.cpp#L717-L734

That should remove the need to build and check the `InitializedFields` set, 
because you'll never need to consider a field that is partially initialized: 
you'll only visit fully-uninitialized fields (we'll recurse into structs that 
are partially initialized). You'll still need to recurse into anonymous struct 
and union members when deciding whether to warn, so it doesn't remove all of 
the complexity here, but I think that change should simplify things a bit.

https://github.com/llvm/llvm-project/pull/70829
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to