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

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 15:13:41 PST 2019


NoQ added a comment.

At a glance, it seems as if these are great findings for a hardening effort, but most of these don't look like immediate bugs (had a look at 10 or so), so i guess i'd suggest `optin.cplusplus`, at least for now.

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?)
- 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)

Also huge thanks for keeping things documented!!


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