mc-imperial / dredd

Framework for evaluating C/C++ compiler testing tools
Apache License 2.0
11 stars 3 forks source link

Prevent mutation on cast of passed-by-reference bitfield l-value #279

Closed JonathanFoo0523 closed 1 month ago

JonathanFoo0523 commented 1 month ago

Addresses an issue where implicit casts on bitfield l-values, subsequently passed by reference, are mutated. To prevent this, we check if the underlying value is a bitfield l-value and if the expression is a child of MaterializeTemporaryExpr. If both conditions are met, the mutation is avoided.

Fixes #259