We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18d08bf commit 5e80310Copy full SHA for 5e80310
src/goto-programs/class_hierarchy.cpp
@@ -50,8 +50,11 @@ void class_hierarchy_grapht::populate(const symbol_tablet &symbol_table)
50
const irep_idt &parent = to_symbol_type(base.type()).get_identifier();
51
if(!parent.empty())
52
{
53
- add_edge(
54
- nodes_by_name.at(parent), nodes_by_name.at(symbol_pair.first));
+ const auto parent_node_it = nodes_by_name.find(parent);
+ DATA_INVARIANT(
55
+ parent_node_it != nodes_by_name.end(),
56
+ "parent class not in symbol table");
57
+ add_edge(parent_node_it->second, nodes_by_name.at(symbol_pair.first));
58
}
59
60
0 commit comments