Skip to content

Commit 22e9267

Browse files
author
thk123
committed
Use ID_C_typedef rather than ID_typedef
This is more consistent with other flags that do not affect the semantics of the program.
1 parent fc8d7c6 commit 22e9267

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/ansi-c/ansi_c_declaration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ typet ansi_c_declarationt::full_type(
148148

149149
// retain typedef for dump-c
150150
if(get_is_typedef())
151-
result.set(ID_typedef,declarator.get_name());
151+
result.set(ID_C_typedef,declarator.get_name());
152152

153153
return result;
154154
}

src/ansi-c/c_typecheck_type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void c_typecheck_baset::typecheck_type(typet &type)
5252
c_qualifiers+=c_qualifierst(type.subtype());
5353
bool packed=type.get_bool(ID_C_packed);
5454
exprt alignment=static_cast<const exprt &>(type.find(ID_C_alignment));
55-
irept _typedef=type.find(ID_typedef);
55+
irept _typedef=type.find(ID_C_typedef);
5656

5757
type.swap(type.subtype());
5858

@@ -62,7 +62,7 @@ void c_typecheck_baset::typecheck_type(typet &type)
6262
if(alignment.is_not_nil())
6363
type.add(ID_C_alignment, alignment);
6464
if(_typedef.is_not_nil())
65-
type.add(ID_typedef, _typedef);
65+
type.add(ID_C_typedef, _typedef);
6666

6767
return; // done
6868
}

src/ansi-c/expr2c.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ std::string expr2ct::convert_rec(
232232
std::string d=
233233
declarator==""?declarator:" "+declarator;
234234

235-
if(src.find(ID_typedef).is_not_nil())
235+
if(src.find(ID_C_typedef).is_not_nil())
236236
{
237-
return q+id2string(src.get(ID_typedef))+d;
237+
return q+id2string(src.get(ID_C_typedef))+d;
238238
}
239239

240240
if(src.id()==ID_bool)

src/util/irep_ids.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ concatenation
251251
infinity
252252
return_type
253253
typedef
254+
C_typedef
254255
extern
255256
static
256257
auto

0 commit comments

Comments
 (0)