[clang] Reland: [clang] Diagnose dangling issues for the "Container<GSLPointer>" case. #107213 (PR #108344)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 13 13:45:53 PDT 2024


hokein wrote:

> We seem to be good at detecting new false positives but this is natural due to the visible compiler diagnositc. Unfortunately, same is not true for new false-negatives. More tests in our test-suite is the only way to detect those and we should be extensively adding more tests. This is something I feel particularly missing for lifetime analysis given the complexity of the code. This is obviously not actionable and non-blocking and is more of a meta comment.

+1, I fully agree with your point. I’ve felt that the current test lacks sufficient coverage. On the other side, I think the situation has been getter better with our recent improvements to lifetime analysis. Hopefully, with continued effort, we’ll reach a point where the test cover the majority of key cases.

> See my comment for ideas for more tests.
> 
> I also found a recently introduced false-negative. This is not particularly introduced by this PR but is very related: #108463

Thanks, please see my replied comment.


https://github.com/llvm/llvm-project/pull/108344


More information about the cfe-commits mailing list