Skip to content

is_not_zero: ensure equality test has exactly matching types #4170

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

Merged

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Feb 13, 2019

This is required to eliminate base_type_eq in #4056

@smowton smowton mentioned this pull request Feb 13, 2019
3 tasks
@kroening
Copy link
Member

It bugs me a bit that we basically have to do this on every usage of from_integer.
Are there views on giving a namespace to from_integer?

Copy link
Contributor

@allredj allredj left a 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: 0225d20).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100752679

@kroening
Copy link
Member

Oh, and an alternative would be to stuff the subtype of the enum into the tag type.

@tautschnig
Copy link
Collaborator

Maybe from_integer shouldn't support enums? One could always use zero_initializer instead.

@smowton
Copy link
Contributor Author

smowton commented Feb 13, 2019

So, merge this and refactor later, or...?

@kroening
Copy link
Member

Merge now, I'd say, but let's keep thinking about it.
@tautschnig zero_initializer can do it because it gets a namespace.

@kroening kroening merged commit 7b3f0c1 into diffblue:develop Feb 13, 2019
@tautschnig
Copy link
Collaborator

I have reviewed the 20 lines preceding each use of from_integer - #4178 was the only case that seemed left to handle, with only four or so cases (among more than 900) doing anything about enums.

@kroening
Copy link
Member

Many thanks; those four are not likely worth the tweak to the signature of from_integer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants