File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
536
536
vt_symb_type.type .set (ID_name, vt_symb_type.name );
537
537
vt_symb_type.is_type =true ;
538
538
539
- bool failed=!symbol_table.insert (std::move (vt_symb_type));
539
+ const bool failed=!symbol_table.insert (std::move (vt_symb_type));
540
540
assert (!failed);
541
541
542
542
// add a virtual-table pointer
@@ -612,7 +612,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
612
612
arg.set (ID_C_identifier, arg_symb.name );
613
613
614
614
// add the parameter to the symbol table
615
- bool failed=!symbol_table.insert (std::move (arg_symb));
615
+ const bool failed=!symbol_table.insert (std::move (arg_symb));
616
616
assert (!failed);
617
617
}
618
618
Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ void generate_class_stub(
86
86
new_symbol.mode =ID_java;
87
87
new_symbol.is_type =true ;
88
88
89
- auto res=symbol_table.insert (std::move (new_symbol));
89
+ optionalt<std::reference_wrapper<symbolt>> res=
90
+ symbol_table.insert (std::move (new_symbol));
90
91
91
92
if (!res)
92
93
{
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ void symbol_tablet::erase(const symbolst::const_iterator &entry)
115
115
const symbolt &symbol=entry->second ;
116
116
117
117
symbol_base_mapt::const_iterator
118
- base_it=symbol_base_map.lower_bound (entry->second .base_name ),
118
+ base_it=symbol_base_map.lower_bound (entry->second .base_name );
119
+ symbol_base_mapt::const_iterator
119
120
base_it_end=symbol_base_map.upper_bound (entry->second .base_name );
120
121
while (base_it!=base_it_end && base_it->second !=symbol.name )
121
122
++base_it;
You can’t perform that action at this time.
0 commit comments