[clang] [clang][analyzer] Ignore unnamed bitfields in UninitializedObjectChecker (PR #132427)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 26 01:55:00 PDT 2025


steakhal wrote:

> My proposal is to judge the current `FieldDecl` at the beginning of the loop, and if it's a UnamedBitField, just skip it, because at that point the UnamedBitField's static check should be passing. If it's a NamedBitField then it needs to be initialized to pass the static check (i.e. go deeper to determine the type, value or whatever).

Exactly. I think it makes a lot more sense to check this as early as possible to have a reduced set of possibilities to think about later. @kr-2003 Could you please update your PR accordingly?

> The current test cases are sufficient. I'm not sure about the answers to the other questions.

I agree.



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


More information about the cfe-commits mailing list