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(
47
47
if (identifier.starts_with (CPROVER_PREFIX " architecture_" ))
48
48
return {};
49
49
50
- const typet &type = ns.follow (symbol.type );
51
-
52
50
// check type
53
- if (type.id () == ID_code || type.id () == ID_empty)
51
+ if (symbol. type .id () == ID_code || symbol. type .id () == ID_empty)
54
52
return {};
55
53
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 ())
57
55
{
58
56
// C standard 6.9.2, paragraph 5
59
57
// adjust the type to an array of size 1
60
58
symbolt &writable_symbol = symbol_table.get_writeable_ref (identifier);
61
- writable_symbol.type = type;
59
+ writable_symbol.type = symbol. type ;
62
60
writable_symbol.type .set (ID_size, from_integer (1 , size_type ()));
63
61
}
64
62
65
63
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 ()))
68
68
{
69
69
return {}; // do not initialize
70
70
}
You can’t perform that action at this time.
0 commit comments