-
Notifications
You must be signed in to change notification settings - Fork 274
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
Conversation
index_exprt index_expr(symbol.symbol_expr(), from_integer(0, index_type())); | ||
rhs.move_to_operands(index_expr); | ||
} | ||
rhs.add_to_operands( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
511fdc8
to
344df21
Compare
344df21
to
1c5cab8
Compare
There was a problem hiding this 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
src/cpp/cpp_typecheck.cpp
Outdated
@@ -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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
1c5cab8
to
85e8841
Compare
There was a problem hiding this 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
85e8841
to
471b95d
Compare
There was a problem hiding this 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
There was a problem hiding this 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.
471b95d
to
b507534
Compare
There was a problem hiding this 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); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subtil!
b507534
to
5d6d83d
Compare
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.
5d6d83d
to
b2eff7e
Compare
There was a problem hiding this 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
move_to_operands is deprecated, use add_to_operands(std::move(...)) or proper
constructors instead.