suoyuan666 wrote:

> > Hi, I’ve moved the assignment backtracking logic from `LifetimeChecker` 
> > into a dedicated file and refactored the diagnostic handling to align with 
> > the format you suggested.
> 
> I do not see the changes yet.

Hi, I’ve updated the assignment backtracking output based on your suggestions 
and extended it to cover other error types.

Here’s a brief summary of the changes:

- use-after-return: The logic is similar to use-after-free, so the integration 
was straightforward. Note that I didn't explicitly handle return statements 
without assignments, as I believe printing them adds little value in those 
cases.
- dangling field/global warnings: Unlike use-after-xx, dangling pointers lack a 
clear `UseExpr`/`ReturnExpr` to identify the target CFG Block. To address this, 
I now persist the `ExpiryExpr` and added `getBlockID` to `FactManager` to 
retrieve the BlockID directly from the corresponding Fact. This provides the 
necessary entry point for the search.

https://github.com/llvm/llvm-project/pull/188467
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to