[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D99262#2682803 , @martong wrote: > In D99262#2673842 , @vsavchenko > wrote: > >> Support nested init lists > > Thanks for addressing the nested lists! (And sorry for the late reply, I

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D99262#2673842 , @vsavchenko wrote: > Support nested init lists Thanks for addressing the nested lists! (And sorry for the late reply, I was on vacation) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9f0d8bac144c: [analyzer] Fix dead store checker false positive (authored by vsavchenko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-07 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 335795. vsavchenko added a comment. Support nested init lists Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99262/new/ https://reviews.llvm.org/D99262 Files: clang/lib/StaticAnalyzer/Checkers/DeadStoresCh

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-07 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D99262#2673825 , @steakhal wrote: > Looks good. Thank you. I guess it will do for PODs, but for regular C++ types we have an early exit until we learn about side effects from constructors. Repository: rG LLVM Github Mon

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-07 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. Looks good. Thank you. Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:420-421 + // We should also allow defensive initialization of structs. + if (const auto *ILE = +

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-07 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:420-421 + // We should also allow defensive initialization of structs. + if (const auto *ILE = + dyn_cast(E->IgnoreParenCasts())) {

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great and I'm also curious about nested initializers. Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:420-421 + // We should also allow defen

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-06 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:420-421 + // We should also allow defensive initialization of structs. + if (const auto *ILE = + dyn_cast(E->IgnoreParenCasts())) {

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-03-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:420-421 + // We should also allow defensive initialization of structs. + if (const auto *ILE = + dyn_cast(E->IgnoreParenCasts())) { +

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-03-29 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 333793. vsavchenko added a comment. Add another test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99262/new/ https://reviews.llvm.org/D99262 Files: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-03-29 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 333789. vsavchenko added a comment. Add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99262/new/ https://reviews.llvm.org/D99262 Files: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp c

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-03-24 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D99262#2648533 , @vsavchenko wrote: > In D99262#2648512 , @steakhal wrote: > >> I see your point. >> >> Would it report this issue? >> >> int test() { >> struct Foo foo = {0, 0}; /

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-03-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D99262#2648512 , @steakhal wrote: > I see your point. > > Would it report this issue? > > int test() { > struct Foo foo = {0, 0}; // I would expect a warning here, that 'foo' was > initialized but never read. > (vo

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-03-24 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I see your point. Would it report this issue? int test() { struct Foo foo = {0, 0}; // I would expect a warning here, that 'foo' was initialized but never read. (void)foo; return 0; } Only nits besides this. Comment at: clang/lib/Sta

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-03-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko created this revision. vsavchenko added reviewers: NoQ, steakhal, xazax.hun, ASDenysPetrov. Herald added subscribers: martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. vsavchenko requested review of this revision. Herald