Skip to content

Commit 9a1cb1d

Browse files
authored
Merge pull request diffblue#3178 from tautschnig/deduplicate-ID_C_c_type
Do not duplicate what c_type_as_string takes care of
2 parents 300742c + f030b60 commit 9a1cb1d

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

src/cpp/expr2cpp.cpp

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -149,37 +149,7 @@ std::string expr2cppt::convert_rec(
149149
{
150150
const irep_idt c_type=src.get(ID_C_c_type);
151151

152-
if(c_type==ID_signed_char)
153-
return q+"signed char"+d;
154-
else if(c_type==ID_unsigned_char)
155-
return q+"unsigned char"+d;
156-
else if(c_type==ID_char)
157-
return q+"char"+d;
158-
else if(c_type==ID_signed_short_int)
159-
return q+"short"+d;
160-
else if(c_type==ID_unsigned_short_int)
161-
return q+"unsigned short"+d;
162-
else if(c_type==ID_signed_int)
163-
return q+"int"+d;
164-
else if(c_type==ID_unsigned_int)
165-
return q+"unsigned"+d;
166-
else if(c_type==ID_signed_long_int)
167-
return q+"long"+d;
168-
else if(c_type==ID_unsigned_long_int)
169-
return q+"unsigned long"+d;
170-
else if(c_type==ID_signed_long_long_int)
171-
return q+"long long"+d;
172-
else if(c_type==ID_unsigned_long_long_int)
173-
return q+"unsigned long long"+d;
174-
else if(c_type==ID_wchar_t)
175-
return q+"wchar_t"+d;
176-
else if(c_type==ID_float)
177-
return q+"float"+d;
178-
else if(c_type==ID_double)
179-
return q+"double"+d;
180-
else if(c_type==ID_long_double)
181-
return q+"long double"+d;
182-
else if(c_type==ID_bool)
152+
if(c_type == ID_bool)
183153
return q+"bool"+d;
184154
else
185155
return expr2ct::convert_rec(src, qualifiers, declarator);

0 commit comments

Comments
 (0)