Skip to content

Commit 1c22089

Browse files
committed
Use typet instead of nil_typet when we really don't care
The type will be initialised later on, e.g., as part of type checking. (And nil_typet is deprecated.)
1 parent 3120f0f commit 1c22089

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

jbmc/unit/java_bytecode/load_method_by_regex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static symbolt create_method_symbol(const std::string &method_name)
9292
{
9393
symbolt new_symbol;
9494
new_symbol.name = method_name;
95-
new_symbol.type = java_method_typet{{}, nil_typet{}};
95+
new_symbol.type = java_method_typet{{}, typet{}};
9696
return new_symbol;
9797
}
9898

src/goto-programs/string_abstraction.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,8 @@ const typet &string_abstractiont::build_abstraction_type_rec(const typet &type,
682682
if(known_entry!=known.end())
683683
return known_entry->second;
684684

685-
::std::pair< abstraction_types_mapt::iterator, bool > map_entry(
686-
abstraction_types_map.insert(::std::make_pair(
687-
eff_type, nil_typet())));
685+
::std::pair<abstraction_types_mapt::iterator, bool> map_entry(
686+
abstraction_types_map.insert(::std::make_pair(eff_type, typet())));
688687
if(!map_entry.second)
689688
return map_entry.first->second;
690689

src/jsil/jsil_parse_tree.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ void jsil_declarationt::to_symbol(symbolt &symbol) const
7070

7171
irept throws(find(ID_throw));
7272
side_effect_expr_throwt t(
73-
symbol_exprt::typeless(throws.get(ID_value)),
74-
nil_typet(),
75-
s.source_location());
73+
symbol_exprt::typeless(throws.get(ID_value)), typet(), s.source_location());
7674
code_expressiont ct(t);
7775

7876
if(insert_at_label(r, returns.get(ID_label), code))

0 commit comments

Comments
 (0)