[PATCH] D159106: [analyzer] ArrayBoundCheckerV2 should listen to check::Bind as well

2023-08-31 Thread Balázs Benics via Phabricator via cfe-commits
steakhal planned changes to this revision. steakhal added a comment. This patch would cause FPs on this code: struct S {}; void zero_size_array() { S arr[0]; (void)arr; } Being short on time, I'll just drop this commit from the stack and come back in a late future. This might be

[PATCH] D159106: [analyzer] ArrayBoundCheckerV2 should listen to check::Bind as well

2023-08-30 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:46 + void impl(SVal Loc, bool isLoad, const Stmt *S, CheckerContext ) const; + donat.nagy wrote: > I'd call this function `performCheck` or something

[PATCH] D159106: [analyzer] ArrayBoundCheckerV2 should listen to check::Bind as well

2023-08-30 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy accepted this revision. donat.nagy added a comment. This revision is now accepted and ready to land. This seems to be a straightforward improvement over the current situation; LGTM if you test(ed) it on some real-life code (to ensure that it doesn't introduce a corner case that

[PATCH] D159106: [analyzer] ArrayBoundCheckerV2 should listen to check::Bind as well

2023-08-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, xazax.hun, donat.nagy, Szelethus. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware. Herald added a project: All. steakhal requested review of this revision. Herald