Use context.x() instead of context.sema_ir().x() in check/cpp/ when possible (#6109)

Avoid using `const Context&`. We always work with a cmutable `Context&`
(https://github.com/carbon-language/carbon-lang/pull/6094#discussion_r2359199247).
This commit is contained in:
Boaz Brickner
2025-09-22 10:15:31 +00:00
committed by GitHub
parent 925250f8f9
commit 412d911578
3 changed files with 22 additions and 34 deletions
+1 -2
View File
@@ -517,8 +517,7 @@ static auto BuildThunkBody(clang::Sema& sema,
auto BuildCppThunk(Context& context, const SemIR::Function& callee_function)
-> clang::FunctionDecl* {
clang::FunctionDecl* callee_function_decl =
context.sem_ir()
.clang_decls()
context.clang_decls()
.Get(callee_function.clang_decl_id)
.decl->getAsFunction();
CARBON_CHECK(callee_function_decl);