willcrichton / flowistry

Flowistry is an IDE plugin for Rust that helps you focus on relevant code.
https://marketplace.visualstudio.com/items?itemName=wcrichton.flowistry
MIT License
1.91k stars 45 forks source link

Problems with Loops #89

Open JustusAdam opened 10 months ago

JustusAdam commented 10 months ago

I found there to be issues with loops where the body of the loop is not connected to either the state before or after.

This PR provides a simple test case that illustrates the problem.

The user_data_ref variable isn't even found in the PDG at all and I believe neither is the call to push (the latter I only verified in the virtually identical Paralegal test case where I could dump both the PDG and the MIR to check which location corresponded to the call).