File tree Expand file tree Collapse file tree 4 files changed +13
-20
lines changed
Expand file tree Collapse file tree 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(
356356 throw 0 ;
357357 }
358358
359- if (is_constructor &&
360- base_name!=id2string (symbol.base_name ))
359+ if (is_constructor && base_name != symbol.base_name )
361360 {
362361 error ().source_location =cpp_name.source_location ();
363362 error () << " member function must return a value or void" << eom;
@@ -425,7 +424,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
425424 }
426425
427426 if (is_typedef)
428- component.set (" is_type " , true );
427+ component.set (ID_is_type , true );
429428
430429 if (is_mutable)
431430 component.set (" is_mutable" , true );
@@ -615,11 +614,9 @@ void cpp_typecheckt::typecheck_compound_declarator(
615614
616615 // do the body of the function
617616 typecast_exprt late_cast (
617+ lookup (args[0 ].get (ID_C_identifier)).symbol_expr (),
618618 to_code_type (component.type ()).parameters ()[0 ].type ());
619619
620- late_cast.op0 ()=
621- namespacet (symbol_table).lookup (
622- args[0 ].get (ID_C_identifier)).symbol_expr ();
623620
624621 if (code_type.return_type ().id ()!=ID_empty &&
625622 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(
297297 cppname.move_to_sub (name);
298298
299299 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));
302301
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 ) + " @" +
306304 id2string (symbol.name ));
307305
308306 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)
8989 cppname.move_to_sub (name);
9090
9191 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));
9493
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 ));
9897
9998 exprt var=virtual_table_symbol_var.symbol_expr ();
10099 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)
6161 {
6262 const std::map<irep_idt, exprt> &value_map=cit->second ;
6363
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 ));
6867
6968 symbolt vt_symb_var;
7069 vt_symb_var.name =
You can’t perform that action at this time.
0 commit comments