Skip to content

Remove unused function get_writeable_symbol #2380

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

Closed
wants to merge 1 commit into from

Conversation

tautschnig
Copy link
Collaborator

The function has no user and no documentation, it's purpose is not entirely
obvious, the named parameter was not used -- a lot of code smell overall.

The function has no user and no documentation, it's purpose is not entirely
obvious, the named parameter was not used -- a lot of code smell overall.
@tautschnig
Copy link
Collaborator Author

@NathanJPhillips could you please take a look at this?

@smowton
Copy link
Contributor

smowton commented Jun 21, 2018

It's an iterator with an explicit write operation -- i.e. default operator* and operator-> are const, but there's an explicit write operation if you want to make a change, a la lookup vs. get_writeable, which do and don't generate a journal entry in journalling_symbol_tablet.

It should definitely be documented, for which I choose @NathanJPhillips (delegation is awesome ;)); I guess its user either died or never got implemented in the end? But a non-const iterator over the symbol table doesn't seem like an unreasonable thing to want. I'm not convinced we should kill it though -- instead we should add docs, remove the needless parameter, and add it to symbol-table-base's unit tests.

@tautschnig
Copy link
Collaborator Author

[...] I'm not convinced we should kill it though [...]

I'm perfectly happy keeping it if it gets documented and cleaned up. I'll happily take all guidance from @NathanJPhillips on how to fix it.

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: 53a5061).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/76919827

@NathanJPhillips
Copy link
Contributor

#2492

@tautschnig tautschnig closed this Jul 2, 2018
@tautschnig tautschnig deleted the unused-func-st branch July 2, 2018 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants