Skip to content

Commit

Permalink
Add curly brackets, formatted clang
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add error emitting
  • Loading branch information
badumbatish authored and CohenArthur committed Mar 4, 2024
1 parent 92874ed commit ede65c2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions gcc/rust/resolve/rust-late-name-resolver-2.0.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,20 @@ Late::visit (AST::IdentifierExpr &expr)
auto value = ctx.values.get (expr.get_ident ());

if (label)
resolved = label;
{
resolved = label;
}
else if (value)
resolved = value;
else {
rust_error_at(expr.get_locus (), "could not resolve identifier expression: %qs", expr.get_ident ().as_string ().c_str ());
{
resolved = value;
}
else
{
rust_error_at (expr.get_locus (),
"could not resolve identifier expression: %qs",
expr.get_ident ().as_string ().c_str ());
return;
}
}

ctx.map_usage (expr.get_node_id (), *resolved);

Expand Down

0 comments on commit ede65c2

Please sign in to comment.