Skip to content

Commit aa0dcb9

Browse files
author
Daniel Kroening
authored
Merge pull request #3782 from tautschnig/deprecation-type_exprt
Construct type_exprt in a non-deprecated way
2 parents bbfd361 + bd9c16b commit aa0dcb9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/cpp/cpp_typecheck_resolve.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,24 +324,24 @@ exprt cpp_typecheck_resolvet::convert_identifier(
324324

325325
if(symbol.is_type)
326326
{
327-
e=type_exprt();
327+
e.make_nil();
328328

329329
if(symbol.is_macro) // includes typedefs
330330
{
331-
e.type()=symbol.type;
331+
e = type_exprt(symbol.type);
332332
assert(symbol.type.is_not_nil());
333333
}
334334
else if(symbol.type.id()==ID_c_enum)
335335
{
336-
e.type()=c_enum_tag_typet(symbol.name);
336+
e = type_exprt(c_enum_tag_typet(symbol.name));
337337
}
338338
else if(symbol.type.id() == ID_struct)
339339
{
340-
e.type() = struct_tag_typet(symbol.name);
340+
e = type_exprt(struct_tag_typet(symbol.name));
341341
}
342342
else if(symbol.type.id() == ID_union)
343343
{
344-
e.type() = union_tag_typet(symbol.name);
344+
e = type_exprt(union_tag_typet(symbol.name));
345345
}
346346
}
347347
else if(symbol.is_macro)

0 commit comments

Comments
 (0)