[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 29 08:58:14 PDT 2021
aaron.ballman added a comment.
In D110656#3030580 <https://reviews.llvm.org/D110656#3030580>, @beanz wrote:
> I would greatly prefer to enable this by default, so let me build a toolchain and see how it holds up.
Awesome, SGTM!
> The empty initializer list extension is pretty widely supported, so I single zero-initialization is way less common these days, but I'll look.
It may be widely supported, but there's plenty of single-zero-inits I was finding on that code search:
static guint notification_signals[LAST_SIGNAL] = { 0 };
char port_str[MAX_PORT_STR_LEN+1] = {0};
char aBuf[64] = {0};
unsigned char strong_checksum[SHA256_DIGEST_LENGTH] = {0};
unsigned long zones_size[MAX_NR_ZONES] = {0};
unsigned long zholes_size[MAX_NR_ZONES] = {0};
// and so on
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110656/new/
https://reviews.llvm.org/D110656
More information about the cfe-commits
mailing list