No longer diagnose (functionally) empty structures under -Wuninitialized
An empty structure in C has no way to be initialized, so triggering a -Wuninitialized warning for a variable of empty structure type is not actionable for users. This silences the false positive warning, which matches the behavior of GCC as well. We no longer diagnose if the structure has no members, or has only zero-sized members (unnamed bit-fields, zero-sized bit-fields, empty structure types). Fixes: https://github.com/llvm/llvm-project/issues/26842
Loading
Please sign in to comment