immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.91k stars 229 forks source link

(`c2rust-analyze`) Add more (still incomplete) dataflow constraints for ptr casts #947

Open kkysen opened 1 year ago

kkysen commented 1 year ago

3c038606a32329d3e4ce21e308e8a49635a6d44f adds the simple (still incomplete) dataflow constraints for CastKind::Misc (fixes the minimum outlined in https://github.com/immunant/c2rust/pull/839#discussion_r1218701683). The full constraints are trickier since the types can be recursive, so I wanted to split this simpler part out into its own smaller PR first.

b20cea742881dee4c5b4dfe3003345c7db161250 adds complete dataflow constraints for CastKind::Pointer, which is modeled on do_assign, but adjusted given its a ptr cast (fixes https://github.com/immunant/c2rust/pull/839#discussion_r1218696955).