File tree 10 files changed +18
-18
lines changed
10 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ typet cpp_declaratort::merge_type(const typet &declaration_type) const
49
49
}
50
50
else
51
51
{
52
- assert (t.id ()!= irep_idt ());
52
+ assert (! t.id (). empty ());
53
53
p=&t.subtype ();
54
54
}
55
55
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ void cpp_exception_list_rec(
59
59
// grab C/C++ type
60
60
irep_idt c_type=src.get (ID_C_c_type);
61
61
62
- if (c_type!= irep_idt ())
62
+ if (!c_type. empty ())
63
63
{
64
64
dest.push_back (id2string (c_type)+suffix);
65
65
return ;
Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ const symbolt &cpp_typecheckt::instantiate_template(
485
485
bool is_static=new_decl.storage_spec ().is_static ();
486
486
irep_idt access = new_decl.get (ID_C_access);
487
487
488
- assert (access != irep_idt ());
488
+ assert (! access . empty ());
489
489
assert (symb.type .id ()==ID_struct);
490
490
491
491
typecheck_compound_declarator (
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ std::string cpp_type2name(const typet &type)
119
119
// we try to use #c_type
120
120
const irep_idt c_type=type.get (ID_C_c_type);
121
121
122
- if (c_type!= irep_idt ())
122
+ if (!c_type. empty ())
123
123
result+=id2string (c_type);
124
124
else if (type.id ()==ID_unsignedbv)
125
125
result+=" unsigned_int" ;
@@ -131,7 +131,7 @@ std::string cpp_type2name(const typet &type)
131
131
// we try to use #c_type
132
132
const irep_idt c_type=type.get (ID_C_c_type);
133
133
134
- if (c_type!= irep_idt ())
134
+ if (!c_type. empty ())
135
135
result+=id2string (c_type);
136
136
else
137
137
result+=" double" ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ void cpp_typecheckt::typecheck_compound_bases(struct_typet &type)
71
71
bool virtual_base = base_it->get_bool (ID_virtual);
72
72
irep_idt class_access = base_it->get (ID_protection);
73
73
74
- if (class_access== irep_idt ())
74
+ if (class_access. empty ())
75
75
class_access = default_class_access;
76
76
77
77
base_symbol_expr.id (ID_base);
Original file line number Diff line number Diff line change @@ -602,7 +602,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
602
602
{
603
603
irep_idt base_name=arg.get_base_name ();
604
604
605
- if (base_name== irep_idt ())
605
+ if (base_name. empty ())
606
606
base_name=" arg" +std::to_string (i++);
607
607
608
608
symbolt arg_symb;
@@ -769,7 +769,7 @@ void cpp_typecheckt::put_compound_into_scope(
769
769
const irep_idt &name=compound .get_name ();
770
770
771
771
// nothing to do if no base_name (e.g., an anonymous bitfield)
772
- if (base_name== irep_idt ())
772
+ if (base_name. empty ())
773
773
return ;
774
774
775
775
if (compound .type ().id ()==ID_code)
@@ -983,7 +983,7 @@ void cpp_typecheckt::typecheck_compound_body(symbolt &symbol)
983
983
continue ;
984
984
}
985
985
986
- if (declaration.type ().id ()== irep_idt ()) // empty?
986
+ if (declaration.type ().id (). empty ())
987
987
continue ;
988
988
989
989
bool is_typedef=declaration.is_typedef ();
@@ -1259,7 +1259,7 @@ void cpp_typecheckt::typecheck_member_function(
1259
1259
1260
1260
if (component.get_bool (ID_is_static))
1261
1261
{
1262
- if (method_qualifier.id ()!= irep_idt ())
1262
+ if (! method_qualifier.id (). empty ())
1263
1263
{
1264
1264
error ().source_location =component.source_location ();
1265
1265
error () << " method is static -- no qualifiers allowed" << eom;
Original file line number Diff line number Diff line change @@ -571,7 +571,7 @@ bool cpp_typecheckt::operator_is_overloaded(exprt &expr)
571
571
}
572
572
573
573
for (const operator_entryt *e=operators;
574
- e->id != irep_idt ();
574
+ ! e->id . empty ();
575
575
e++)
576
576
if (expr.id ()==e->id )
577
577
{
Original file line number Diff line number Diff line change 20
20
21
21
void cpp_typecheckt::typecheck_type (typet &type)
22
22
{
23
- assert (type.id ()!= irep_idt ());
23
+ assert (! type.id (). empty ());
24
24
assert (type.is_not_nil ());
25
25
26
26
try
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ std::string expr2cppt::convert_rec(
150
150
{
151
151
return q+convert (src.subtype ())+" &&" +d;
152
152
}
153
- else if (src.get (ID_C_c_type)!= irep_idt ())
153
+ else if (! src.get (ID_C_c_type). empty ())
154
154
{
155
155
const irep_idt c_type=src.get (ID_C_c_type);
156
156
@@ -208,7 +208,7 @@ std::string expr2cppt::convert_rec(
208
208
else
209
209
dest+=" struct" ;
210
210
211
- if (symbol.pretty_name != irep_idt ())
211
+ if (! symbol.pretty_name . empty ())
212
212
dest+=" " +id2string (symbol.pretty_name );
213
213
214
214
dest+=d;
@@ -221,7 +221,7 @@ std::string expr2cppt::convert_rec(
221
221
222
222
dest+=" enum" ;
223
223
224
- if (symbol.pretty_name != irep_idt ())
224
+ if (! symbol.pretty_name . empty ())
225
225
dest+=" " +id2string (symbol.pretty_name );
226
226
227
227
dest+=d;
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ class Parser // NOLINT(readability/identifiers)
398
398
{
399
399
typet *p=&dest;
400
400
401
- while (p->id ()!= irep_idt () && p->is_not_nil ())
401
+ while (! p->id (). empty () && p->is_not_nil ())
402
402
{
403
403
if (p->id ()==ID_merged_type)
404
404
{
@@ -2224,7 +2224,7 @@ bool Parser::optIntegralTypeOrClassSpec(typet &p)
2224
2224
default : type_id=irep_idt ();
2225
2225
}
2226
2226
2227
- if (type_id!= irep_idt ())
2227
+ if (!type_id. empty ())
2228
2228
{
2229
2229
cpp_tokent tk;
2230
2230
typet kw;
@@ -3467,7 +3467,7 @@ bool Parser::rOperatorName(irept &name)
3467
3467
return rCastOperatorName (name);
3468
3468
}
3469
3469
3470
- assert (operator_id!= irep_idt ());
3470
+ assert (!operator_id. empty ());
3471
3471
lex.get_token (tk);
3472
3472
name=irept (operator_id);
3473
3473
set_location (name, tk);
You can’t perform that action at this time.
0 commit comments