File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -47,24 +47,24 @@ static std::optional<codet> static_lifetime_init(
4747 if (identifier.starts_with (CPROVER_PREFIX " architecture_" ))
4848 return {};
4949
50- const typet &type = ns.follow (symbol.type );
51-
5250 // check type
53- if (type.id () == ID_code || type.id () == ID_empty)
51+ if (symbol. type .id () == ID_code || symbol. type .id () == ID_empty)
5452 return {};
5553
56- if (type.id () == ID_array && to_array_type (type).size ().is_nil ())
54+ if (symbol. type .id () == ID_array && to_array_type (symbol. type ).size ().is_nil ())
5755 {
5856 // C standard 6.9.2, paragraph 5
5957 // adjust the type to an array of size 1
6058 symbolt &writable_symbol = symbol_table.get_writeable_ref (identifier);
61- writable_symbol.type = type;
59+ writable_symbol.type = symbol. type ;
6260 writable_symbol.type .set (ID_size, from_integer (1 , size_type ()));
6361 }
6462
6563 if (
66- (type.id () == ID_struct || type.id () == ID_union) &&
67- to_struct_union_type (type).is_incomplete ())
64+ (symbol.type .id () == ID_struct_tag &&
65+ ns.follow_tag (to_struct_tag_type (symbol.type )).is_incomplete ()) ||
66+ (symbol.type .id () == ID_union_tag &&
67+ ns.follow_tag (to_union_tag_type (symbol.type )).is_incomplete ()))
6868 {
6969 return {}; // do not initialize
7070 }
You can’t perform that action at this time.
0 commit comments