Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/goto-programs/class_hierarchy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ void class_hierarchy_grapht::populate(const symbol_tablet &symbol_table)
const irep_idt &parent = to_symbol_type(base.type()).get_identifier();
if(!parent.empty())
{
add_edge(
nodes_by_name.at(parent), nodes_by_name.at(symbol_pair.first));
const auto parent_node_it = nodes_by_name.find(parent);
DATA_INVARIANT(
parent_node_it != nodes_by_name.end(),
"parent class not in symbol table");
add_edge(parent_node_it->second, nodes_by_name.at(symbol_pair.first));
}
}
}
Expand Down