File tree 5 files changed +7
-7
lines changed 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ void ansi_c_declaratort::build(irept &src)
33
33
t.make_nil ();
34
34
break ;
35
35
}
36
- else if (t.id ()== irep_idt () ||
36
+ else if (t.id (). empty () ||
37
37
t.is_nil ())
38
38
{
39
39
assert (0 );
Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ void c_typecheck_baset::typecheck_function_body(symbolt &symbol)
539
539
p_it++)
540
540
{
541
541
// may be anonymous
542
- if (p_it->get_base_name ()== irep_idt ())
542
+ if (p_it->get_base_name (). empty ())
543
543
{
544
544
irep_idt base_name=" #anon" +std::to_string (anon_counter++);
545
545
p_it->set_base_name (base_name);
Original file line number Diff line number Diff line change @@ -1522,7 +1522,7 @@ void c_typecheck_baset::typecheck_expr_member(exprt &expr)
1522
1522
// copy method identifier
1523
1523
const irep_idt &identifier=component.get (ID_C_identifier);
1524
1524
1525
- if (identifier!= irep_idt ())
1525
+ if (!identifier. empty ())
1526
1526
expr.set (ID_C_identifier, identifier);
1527
1527
1528
1528
const irep_idt &access =component.get_access ();
Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ void c_typecheck_baset::typecheck_code_type(code_typet &type)
428
428
irep_idt identifier=declaration.declarator ().get_name ();
429
429
430
430
// abstract or not?
431
- if (identifier== irep_idt ())
431
+ if (identifier. empty ())
432
432
{
433
433
// abstract
434
434
parameter.add_source_location ()=declaration.type ().source_location ();
@@ -550,7 +550,7 @@ void c_typecheck_baset::typecheck_array_type(array_typet &type)
550
550
{
551
551
// not a constant and not infinity
552
552
553
- assert (current_symbol_id!= irep_idt ());
553
+ assert (!current_symbol_id. empty ());
554
554
555
555
const symbolt &base_symbol=lookup (current_symbol_id);
556
556
@@ -862,7 +862,7 @@ void c_typecheck_baset::typecheck_compound_body(
862
862
// scan for anonymous members, and name them
863
863
for (auto &member : components)
864
864
{
865
- if (member.get_name ()!= irep_idt ())
865
+ if (! member.get_name (). empty ())
866
866
continue ;
867
867
868
868
member.set_name (" $anon" +std::to_string (anon_member_counter++));
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ static std::string type2name(
110
110
if (!type.source_location ().get_function ().empty ())
111
111
result+=' l' ;
112
112
113
- if (type.id ()== irep_idt ())
113
+ if (type.id (). empty ())
114
114
throw " empty type encountered" ;
115
115
else if (type.id ()==ID_empty)
116
116
result+=' V' ;
You can’t perform that action at this time.
0 commit comments