mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Clean up some misc toolchain braced inits. (#4013)
Following up on #4012 and #4009, clean scattered cases which could be making better use of designated initializers.
This commit is contained in:
@@ -86,7 +86,8 @@ auto DeclNameStack::PopScope() -> void {
|
||||
auto DeclNameStack::Suspend() -> SuspendedName {
|
||||
CARBON_CHECK(decl_name_stack_.back().state == NameContext::State::Finished)
|
||||
<< "Missing call to FinishName before Suspend";
|
||||
SuspendedName result = {decl_name_stack_.pop_back_val(), {}};
|
||||
SuspendedName result = {.name_context = decl_name_stack_.pop_back_val(),
|
||||
.scopes = {}};
|
||||
auto enclosing_index = result.name_context.initial_scope_index;
|
||||
auto& scope_stack = context_->scope_stack();
|
||||
while (scope_stack.PeekIndex() > enclosing_index) {
|
||||
|
||||
Reference in New Issue
Block a user