Skip to content

Commit

Permalink
use proper constructor for code_expressiont
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kroening committed Jul 6, 2018
1 parent 47f5405 commit 8e44191
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/goto-programs/remove_function_pointers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,8 @@ void remove_function_pointerst::remove_function_pointer(

// We preserve the original dereferencing to possibly catch
// further pointer-related errors.
code_expressiont code_expression;
code_expressiont code_expression(function);
code_expression.add_source_location()=function.source_location();
code_expression.expression()=function;
target->code.swap(code_expression);
target->type=OTHER;

Expand Down

0 comments on commit 8e44191

Please sign in to comment.