[clang] [clang][analyzer] CallAndMessage warnings at pointer to uninitialized struct (PR #164600)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 16 05:00:58 PST 2025


================
@@ -179,6 +179,12 @@ def CallAndMessageChecker
                "Check whether the reciever in the message expression is "
                "undefined",
                "true", Released>,
+           CmdLineOption<
+               Boolean, "ArgPointeeInitializednessComplete",
+               "If set to true, treat a struct as initialized when all of its "
+               "members are initialized, otherwise when it has any initialized "
+               "member (used only at ArgPointeeInitializedness)",
+               "false", Released>,
----------------
NagyDonat wrote:

> That said, as this was the existing norm for this checker, I would not gate this change with that requirement, but in the future we should think about raising the bar even for this checker. Either way, we should not hold this PR back much longer, and optionally revisit this if we have time. (I definitely don't :s)

I agree with this. This commit should add the new feature in a style/quality that is consistent with the rest of the checker, and then (when we have time...) we should clean up the whole checker in a consistent way.

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


More information about the cfe-commits mailing list