Skip to content

Set mode of if_exprt introduced in preprocessing #2130

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
Apr 28, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/java_bytecode/java_string_library_preprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,11 @@ void java_string_library_preprocesst::code_assign_java_string_to_string_expr(
// Although we should not reach this code if rhs is null, the association
// `pointer -> length` is added to the solver anyway, so we have to make sure
// the length is set to something reasonable.
const auto rhs_length = if_exprt(
auto rhs_length = if_exprt(
equal_exprt(rhs, null_pointer_exprt(to_pointer_type(rhs.type()))),
from_integer(0, lhs.length().type()),
get_length(deref, symbol_table));
rhs_length.set(ID_mode, ID_java);

// Assignments
code.add(code_assignt(lhs.length(), rhs_length), loc);
Expand Down