@@ -609,27 +609,26 @@ void c_typecheck_baset::typecheck_array_type(array_typet &type)
609
609
}
610
610
611
611
// Need to pull out! We insert new symbol.
612
- unsigned count= 0 ;
612
+ unsigned count = 0 ;
613
613
irep_idt temp_identifier;
614
614
std::string suffix;
615
615
616
616
do
617
617
{
618
- suffix= " $array_size" + std::to_string (count);
619
- temp_identifier= id2string (current_symbol.name )+ suffix;
618
+ suffix = " $array_size" + std::to_string (count);
619
+ temp_identifier = id2string (current_symbol.name ) + suffix;
620
620
count++;
621
- }
622
- while (symbol_table.symbols .find (temp_identifier)!=
623
- symbol_table.symbols .end ());
621
+ } while (symbol_table.symbols .find (temp_identifier) !=
622
+ symbol_table.symbols .end ());
624
623
625
624
// add the symbol to symbol table
626
625
auxiliary_symbolt new_symbol;
627
- new_symbol.name = temp_identifier;
628
- new_symbol.pretty_name = id2string (current_symbol.pretty_name )+ suffix;
629
- new_symbol.base_name = id2string (current_symbol.base_name )+ suffix;
630
- new_symbol.type = size.type ();
626
+ new_symbol.name = temp_identifier;
627
+ new_symbol.pretty_name = id2string (current_symbol.pretty_name ) + suffix;
628
+ new_symbol.base_name = id2string (current_symbol.base_name ) + suffix;
629
+ new_symbol.type = size.type ();
631
630
new_symbol.type .set (ID_C_constant, true );
632
- new_symbol.value = size;
631
+ new_symbol.value = size;
633
632
new_symbol.location = size_source_location;
634
633
new_symbol.mode = mode;
635
634
@@ -638,14 +637,14 @@ void c_typecheck_baset::typecheck_array_type(array_typet &type)
638
637
// produce the code that declares and initializes the symbol
639
638
symbol_exprt symbol_expr;
640
639
symbol_expr.set_identifier (temp_identifier);
641
- symbol_expr.type ()= new_symbol.type ;
640
+ symbol_expr.type () = new_symbol.type ;
642
641
643
642
code_declt declaration (symbol_expr);
644
643
declaration.add_source_location () = size_source_location;
645
644
646
645
code_assignt assignment;
647
646
assignment.lhs ()=symbol_expr;
648
- assignment.rhs ()= size;
647
+ assignment.rhs () = size;
649
648
assignment.add_source_location () = size_source_location;
650
649
651
650
// store the code
0 commit comments