File tree 4 files changed +13
-20
lines changed 4 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -356,8 +356,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
356
356
throw 0 ;
357
357
}
358
358
359
- if (is_constructor &&
360
- base_name!=id2string (symbol.base_name ))
359
+ if (is_constructor && base_name != symbol.base_name )
361
360
{
362
361
error ().source_location =cpp_name.source_location ();
363
362
error () << " member function must return a value or void" << eom;
@@ -425,7 +424,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
425
424
}
426
425
427
426
if (is_typedef)
428
- component.set (" is_type " , true );
427
+ component.set (ID_is_type , true );
429
428
430
429
if (is_mutable)
431
430
component.set (" is_mutable" , true );
@@ -615,11 +614,9 @@ void cpp_typecheckt::typecheck_compound_declarator(
615
614
616
615
// do the body of the function
617
616
typecast_exprt late_cast (
617
+ lookup (args[0 ].get (ID_C_identifier)).symbol_expr (),
618
618
to_code_type (component.type ()).parameters ()[0 ].type ());
619
619
620
- late_cast.op0 ()=
621
- namespacet (symbol_table).lookup (
622
- args[0 ].get (ID_C_identifier)).symbol_expr ();
623
620
624
621
if (code_type.return_type ().id ()!=ID_empty &&
625
622
code_type.return_type ().id ()!=ID_destructor)
Original file line number Diff line number Diff line change @@ -297,12 +297,10 @@ void cpp_typecheckt::default_cpctor(
297
297
cppname.move_to_sub (name);
298
298
299
299
const symbolt &virtual_table_symbol_type =
300
- namespacet (symbol_table).lookup (
301
- mem_it->type ().subtype ().get (ID_identifier));
300
+ lookup (mem_it->type ().subtype ().get (ID_identifier));
302
301
303
- const symbolt &virtual_table_symbol_var =
304
- namespacet (symbol_table).lookup (
305
- id2string (virtual_table_symbol_type.name ) + " @" +
302
+ const symbolt &virtual_table_symbol_var = lookup (
303
+ id2string (virtual_table_symbol_type.name ) + " @" +
306
304
id2string (symbol.name ));
307
305
308
306
exprt var=virtual_table_symbol_var.symbol_expr ();
Original file line number Diff line number Diff line change @@ -89,12 +89,11 @@ codet cpp_typecheckt::dtor(const symbolt &symbol)
89
89
cppname.move_to_sub (name);
90
90
91
91
const symbolt &virtual_table_symbol_type =
92
- namespacet (symbol_table).lookup (
93
- cit->type ().subtype ().get (ID_identifier));
92
+ lookup (cit->type ().subtype ().get (ID_identifier));
94
93
95
- const symbolt &virtual_table_symbol_var =
96
- namespacet (symbol_table). lookup (
97
- id2string (virtual_table_symbol_type. name )+ " @ " + id2string (symbol.name ));
94
+ const symbolt &virtual_table_symbol_var = lookup (
95
+ id2string (virtual_table_symbol_type. name ) + " @ " +
96
+ id2string (symbol.name ));
98
97
99
98
exprt var=virtual_table_symbol_var.symbol_expr ();
100
99
address_of_exprt address (var);
Original file line number Diff line number Diff line change @@ -61,10 +61,9 @@ void cpp_typecheckt::do_virtual_table(const symbolt &symbol)
61
61
{
62
62
const std::map<irep_idt, exprt> &value_map=cit->second ;
63
63
64
- const symbolt &late_cast_symb=namespacet (symbol_table).lookup (cit->first );
65
- const symbolt &vt_symb_type=
66
- namespacet (symbol_table).lookup (
67
- " virtual_table::" +id2string (late_cast_symb.name ));
64
+ const symbolt &late_cast_symb = lookup (cit->first );
65
+ const symbolt &vt_symb_type =
66
+ lookup (" virtual_table::" + id2string (late_cast_symb.name ));
68
67
69
68
symbolt vt_symb_var;
70
69
vt_symb_var.name =
You can’t perform that action at this time.
0 commit comments