-
Notifications
You must be signed in to change notification settings - Fork 274
Remove unnecessary use of ns.follow in goto-programs/ #3761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary use of ns.follow in goto-programs/ #3761
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 6eb9142).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97032295
@@ -96,7 +96,7 @@ void goto_convertt::remove_assignment( | |||
|
|||
exprt rhs; | |||
|
|||
const typet &op0_type=ns.follow(expr.op0().type()); | |||
const typet &op0_type = expr.op0().type(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the test at line 108 would therefore have been unreachable prior to this change -- but evidently our tests did not reveal that. Add a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This not only was dead code, it actually still is dead code: the front-end already introduces type casts (both the C and C++ front-ends take care of this). I have, in a second commit, removed the dead code and added a PRECONDITION
in the else
case.
65cd9a2
to
375e6db
Compare
375e6db
to
0cbacbc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: 375e6db).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97056355
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 0cbacbc).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97057429
The first commit is definitively ok. |
Only structs, unions, enums can be hidden behind tags.
0cbacbc
to
d4ec352
Compare
I have moved the second commit to #3770. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: d4ec352).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97132922
Only structs, unions, enums can be hidden behind tags.