After spending some time on unrelated tasks, I’m returning to this loop handling project with some new plans. Based on the very promising test results (that I evaluate in the comment above this one), I decided to return to building general solutions.
I had hoped that the “create report suppression limited to ArrayBoundV2” approach would be a good intermediate step, but it introduced too much additional complexity and bikeshedding that won’t be relevant for my final goals.
To limit the scope of my changes, I decided to split the intended commits into two PRs based on the “direction” of the unjustified assumption:
- I already created [analyzer] Don't assume third iteration in loops by NagyDonat · Pull Request #119388 · llvm/llvm-project · GitHub to discard branches where the analyzer assumes too many iterations.
- I’ll create another PR to discard branches where the analyzer assumes zero iterations.