[PATCH] D58573: [analyzer] Move UninitializedObject out of alpha

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 10 08:52:55 PDT 2019


Szelethus added a comment.

In D58573#1422198 <https://reviews.llvm.org/D58573#1422198>, @NoQ wrote:

> Also, hmm, how about the following heuristics (looked at the positive in `rtags` and thought about this):
>
> - if the field is public, don't warn (the structure seems to be used simply as a convenient group of variables?)


I disagree with this. If anything, public uninitialized fields should be reported the most.

> - if all uninitialized fields are in all cases written into immediately after the constructor ends, suppress the warning (i vaguely remember that something similar was already proposed, but i might be wrong)

I think we'd need dataflow analysis for that. We do suppress reports though where all fields of an object is uninitialized.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58573/new/

https://reviews.llvm.org/D58573





More information about the cfe-commits mailing list