[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110656#3034971 , @beanz wrote: > In D110656#3034083 , @xbolva00 > wrote: > >> Why just no special case "= {0};" pattern and do not warn in that case? > > This case did show up,

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-10-01 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. In D110656#3034181 , @nathanchance wrote: > I can test this on the Linux kernel tonight and report the results tomorrow > morning. My apologies, I did not have time to get to this last night or today and I am going to be

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D110656#3034083 , @xbolva00 wrote: > Why just no special case "= {0};" pattern and do not warn in that case? This case did show up, but was not the majority of issues for LLVM (although might be the majority we care about). The

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. I can test this on the Linux kernel tonight and report the results tomorrow morning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110656/new/ https://reviews.llvm.org/D110656

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: nathanchance. xbolva00 added a comment. >> If there are other patterns, I'd love to know what they are. Well, I dont know :) but something may arise so some testing would be useful. If possible, @beanz could share list of new warnings from LLVM build here? Also mayb

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110656#3034083 , @xbolva00 wrote: > Why just no special case "= {0};" pattern and do not warn in that case? This was what I was thinking. I was basing that on the idea that `= { 0 }` to zero init the entire array is fa

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Why just no special case "= {0};" pattern and do not warn in that case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110656/new/ https://reviews.llvm.org/D110656 ___ cfe-commit

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Even just building Clang with this enabled revealed... a lot... Some of them are easy to address (having tablegen disable the warning in generated code), some of them are exactly the kind of thing I wanted to warn on, and some of them are more complicated. Based on that

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In 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 supporte

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I would greatly prefer to enable this by default, so let me build a toolchain and see how it holds up. The empty initializer list extension is pretty widely supported, so I single zero-initialization is way less common these days, but I'll look. Repository: rG LLVM Gi

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. We typically do not introduce new off-by-default warnings into Clang because experience has shown that users typically do not enable them (so they tend not to be worth the maintenance burden). Instead, we try to make warnings that can be on-by-default with a very

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 375711. beanz added a comment. Updating so that the warning doesn't fire on an empty initializer list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110656/new/ https://reviews.llvm.org/D110656 Files: clang/in

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, rsmith, RKSimon, dexonsmith. beanz requested review of this revision. Herald added a project: clang. When defining a statically sized array with explicit array initializers, having a warning for uninitialized members is nice. This