Skip to content

Commit 3a8323f

Browse files
author
Daniel Kroening
committed
further support for struct/union tags
1 parent 0fede8f commit 3a8323f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util/type.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ bool is_constant_or_has_constant_components(
9999
// we have to use the namespace to resolve to its definition:
100100
// struct t { const int a; };
101101
// struct t t1;
102-
if(type.id() == ID_symbol_type)
102+
if(type.id() == ID_symbol_type ||
103+
type.id() == ID_struct_tag ||
104+
type.id() == ID_union_tag)
103105
{
104106
const auto &resolved_type = ns.follow(type);
105107
return has_constant_components(resolved_type);

0 commit comments

Comments
 (0)