File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -232,27 +232,29 @@ void cpp_typecheckt::do_not_typechecked()
232
232
symbol.value .get_bool (ID_is_used))
233
233
{
234
234
assert (symbol.type .id ()==ID_code);
235
- symbolt &symbol=*symbol_table. get_writeable (named_symbol. first ) ;
235
+ exprt value = symbol. value ;
236
236
237
237
if (symbol.base_name ==" operator=" )
238
238
{
239
239
cpp_declaratort declarator;
240
240
declarator.add_source_location () = symbol.location ;
241
241
default_assignop_value (
242
242
lookup (symbol.type .get (ID_C_member_name)), declarator);
243
- symbol.value .swap (declarator.value ());
244
- convert_function (symbol);
243
+ value.swap (declarator.value ());
245
244
cont=true ;
246
245
}
247
246
else if (symbol.value .operands ().size ()==1 )
248
247
{
249
- exprt tmp = symbol.value .op0 ();
250
- symbol.value .swap (tmp);
251
- convert_function (symbol);
248
+ value = symbol.value .op0 ();
252
249
cont=true ;
253
250
}
254
251
else
255
252
UNREACHABLE; // Don't know what to do!
253
+
254
+ symbolt &writable_symbol =
255
+ *symbol_table.get_writeable (named_symbol.first );
256
+ writable_symbol.value .swap (value);
257
+ convert_function (writable_symbol);
256
258
}
257
259
}
258
260
}
You can’t perform that action at this time.
0 commit comments