Skip to content

Replace all uses of move_to_operands #3691

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
merged 2 commits into from
Jan 20, 2019

Conversation

tautschnig
Copy link
Collaborator

move_to_operands is deprecated, use add_to_operands(std::move(...)) or proper
constructors instead.

  • 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).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

index_exprt index_expr(symbol.symbol_expr(), from_integer(0, index_type()));
rhs.move_to_operands(index_expr);
}
rhs.add_to_operands(
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK usually keep braces when the if statement is multi-line, even if it's a single statement

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

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

@@ -196,7 +196,7 @@ void cpp_typecheckt::static_and_dynamic_initialization()

dynamic_initializations.clear();

// block_sini.move_to_operands(block_dini);
// block_sini.add_to_operands(std::move(block_dini));
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this line just be deleted, given that it's commented out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Possibly so, but with the C++ front-end there is just a lot of cleanup to be done and there may be genuine value in some of the code currently commented out. So I'd rather leave this to be done in other PRs.

Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer using an ifdef 0 plus a comment that explains why the code is commented out/worth keeping.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems neither block_sini nor block_dini exist in anywhere in the code base, I have thus completely removed the line as it is impossible to make sense of 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: 85e8841).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/96877361

@peterschrammel peterschrammel removed their assignment Jan 13, 2019
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: 471b95d).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97275789

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

The parts that touch my parts of the code look fine.

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

cond.move_to_operands(tmp);
final_initializers.get_sub().back().swap(cond);
}
final_initializers.get_sub().back().swap(cond);
}
Copy link
Member

Choose a reason for hiding this comment

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

Subtil!

move_to_operands is deprecated, use add_to_operands(std::move(...)) or proper
constructors instead.
clang-format required that at least one of them be changed as it was close to
the other changes in this PR. This commit now fixes all the preprocessor
commands in parse.cpp.
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: b2eff7e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97969473

@tautschnig tautschnig merged commit 4a96ec9 into diffblue:develop Jan 20, 2019
@tautschnig tautschnig deleted the move_to_operands branch January 20, 2019 22:32
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.

7 participants