[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 21 04:27:12 PDT 2024
Xazax-hun wrote:
I am really glad that there is a consensus on the behavior what we want and the only contention is how would we get there.
It would be great to summarize the pros and cons of the two approaches, but before someone is doing that I wanted to make it clear that I think some of the arguments might not hold much water (but let me know if you disagree). Specifically, the fact that other checkers might also benefit from these new suppression heuristics does not imply that any of the approaches are more desirable than the other. There are visitors shared across the checks, so I believe both approaches could be easily adopted by other checks.
Moreover, I don't think the future discussions about changing path exploration heuristics should get too much weight either. I think if we start to cut some execution paths, we will no longer need the state trait to check if we saw any assumptions, and we no longer need the bug visitor either. I think changing the path exploration heuristics in the engine is a relatively straightforward change and the challenge is to validate that the user experience and the results actually got better rather than making the code change itself.
My point is, I think in this case we should evaluate the approaches on their own merits, and future plans or adoptability to other checks should not play a big role in the decision because I do not see a clear advantage there for either of the solutions. So let's focus the discussion on comparing the correctness, complexity, separation of concerns, and performance of the proposed solutions without the diversions.
https://github.com/llvm/llvm-project/pull/109804
More information about the cfe-commits
mailing list