We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fede8f commit 3a8323fCopy full SHA for 3a8323f
src/util/type.cpp
@@ -99,7 +99,9 @@ bool is_constant_or_has_constant_components(
99
// we have to use the namespace to resolve to its definition:
100
// struct t { const int a; };
101
// struct t t1;
102
- if(type.id() == ID_symbol_type)
+ if(type.id() == ID_symbol_type ||
103
+ type.id() == ID_struct_tag ||
104
+ type.id() == ID_union_tag)
105
{
106
const auto &resolved_type = ns.follow(type);
107
return has_constant_components(resolved_type);
0 commit comments