Skip to content

Remove unused class_identifier parameter from Java object factory #4506

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

antlechner
Copy link
Contributor

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • n/a Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • n/a My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Antonia Lechner added 2 commits April 9, 2019 18:13
This parameter was only "used" in gen_nondet_struct_init, where it was
assigned a new value before it was actually used.
Naming this variable only duplicates the information that is already
given in the name of the function set_class_identifier.
Copy link
Contributor

@thomasspriggs thomasspriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat.

set_class_identifier(
to_struct_expr(*initial_object), ns, struct_tag_typet(qualified_clsid));
to_struct_expr(*initial_object),
ns,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 set_class_identifier doesn't actually use ns. So this parameter could probably be removed, however that is probably a change for another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has a call to ns.follow. I still find it a bit strange that follow is defined only for namespaces and not for symbol tables, but that would definitely be a change for another (much bigger) PR. 🙂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my mistake.

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

@antlechner antlechner merged commit 607df45 into diffblue:develop Apr 10, 2019
@antlechner antlechner deleted the antonia/class-identifier-param branch April 10, 2019 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants