Skip to content

field_sensitivityt::apply does not take a reference #4595

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

romainbrenguier
Copy link
Contributor

We make apply take the expression by copy and return a transformed one.
This makes it more intuitive to use and avoid problems of the kind:

      index_exprt i;
      apply(ns, s, i, true);
      f_of_index_expr(i);

where in the call to f_of_index_expr, i is of type index_exprt but may not have
ID_index thus breaking an invariant which we should intuitively have.

  • Each commit message has a non-empty body, explaining why the change was made.
  • [na] Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • [na] The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • 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).
  • [na] My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • [na] White-space or formatting changes outside the feature-related changed lines are in commits of their own.

We make apply take the expression by copy and return a transformed one.
This makes it more intuitive to use and avoid problems of the kind:

          index_exprt i;
          apply(ns, s, i, true);
          f_of_index_expr(i);

where in the call to `f_of_index_expr`, `i` is of type `index_exprt` but may not have
`ID_index` thus breaking an invariant which we should intuitively have.
@romainbrenguier romainbrenguier force-pushed the clean-up/field-sensitivity branch from c37a6f7 to a786eb3 Compare May 1, 2019 08:37
@tautschnig tautschnig merged commit 8811606 into diffblue:develop May 1, 2019
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.

2 participants