Mark Check::Context::insts() as const and use it in more use cases (#6093)

This commit is contained in:
Boaz Brickner
2025-09-18 13:04:18 +00:00
committed by GitHub
parent 3f6b26c6f2
commit 50a0f908c6
4 changed files with 4 additions and 5 deletions
+1 -2
View File
@@ -599,8 +599,7 @@ static auto IsDeclInjectedClassName(const Context& context,
CARBON_CHECK(ast_context.getCanonicalTagType(scope_record_decl) ==
ast_context.getCanonicalTagType(record_decl));
auto class_decl =
context.sem_ir().insts().GetAs<SemIR::ClassDecl>(clang_decl.inst_id);
auto class_decl = context.insts().GetAs<SemIR::ClassDecl>(clang_decl.inst_id);
CARBON_CHECK(name_id ==
context.sem_ir().classes().Get(class_decl.class_id).name_id);
return true;