Skip to content

Commit

Permalink
Merge pull request #2029 from hzeller/20231019-multi-parent
Browse files Browse the repository at this point in the history
SymbolTable: Gracefully handle current CHECK-fail
  • Loading branch information
hzeller authored Oct 21, 2023
2 parents 520ca4b + 3681b01 commit 66c8c26
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion verilog/analysis/symbol_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,12 @@ static void ResolveReferenceComponentNode(
switch (component.ref_type) {
case ReferenceType::kUnqualified: {
// root node: lookup this symbol from its context upward
CHECK(node->Parent() == nullptr);
if (node->Parent() != nullptr) {
// TODO(hzeller): Is this a situation that should never happen thus
// be dealt with further up-stream ? (changed from a CHECK()).
LOG(WARNING) << *node << ": Parent exists " << *node->Parent() << "\n";
return;
}
ResolveUnqualifiedName(&component, context, diagnostics);
break;
}
Expand Down

0 comments on commit 66c8c26

Please sign in to comment.