Add Check::Context::clang_decls() methods (#6094)

Use them instead of explicitly going through `sem_ir()`.
This commit is contained in:
Boaz Brickner
2025-09-19 13:20:01 +00:00
committed by GitHub
parent 8cbf289c91
commit 05c9fd768e
4 changed files with 26 additions and 25 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ auto IsCppThunkRequired(Context& context, const SemIR::Function& function)
// corresponding SemIR function has an acceptable parameter type.
// TODO: We should be able to avoid thunks for reference parameters.
const auto* decl = cast<clang::FunctionDecl>(
context.sem_ir().clang_decls().Get(function.clang_decl_id).decl);
context.clang_decls().Get(function.clang_decl_id).decl);
for (auto* param : decl->parameters()) {
if (param->getType()->isReferenceType()) {
thunk_required = true;