Skip to content

Use generic exprt to avoid deprecated default constructor of symbol_exprt [blocks: #3768] #3870

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 1 commit into from
Jan 23, 2019
Merged
Changes from all commits
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
7 changes: 4 additions & 3 deletions src/goto-instrument/concurrency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Date: October 2012

#include <util/find_symbols.h>
#include <util/invariant.h>
#include <util/optional.h>
#include <util/replace_symbol.h>
#include <util/std_expr.h>

Expand Down Expand Up @@ -58,14 +59,14 @@ class concurrency_instrumentationt
{
public:
typet type;
symbol_exprt array_symbol, w_index_symbol;
optionalt<symbol_exprt> array_symbol, w_index_symbol;
};

class thread_local_vart
{
public:
typet type;
symbol_exprt array_symbol;
optionalt<symbol_exprt> array_symbol;
};

typedef std::map<irep_idt, shared_vart> shared_varst;
Expand Down Expand Up @@ -101,7 +102,7 @@ void concurrency_instrumentationt::instrument(exprt &expr)
// initialized anywhere
const shared_vart &shared_var = v_it->second;
const index_exprt new_expr(
shared_var.array_symbol, shared_var.w_index_symbol);
*shared_var.array_symbol, *shared_var.w_index_symbol);

replace_symbol.insert(s, new_expr);
}
Expand Down