mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 22:02:42 +01:00
Add Check::Context::clang_decls() methods (#6094)
Use them instead of explicitly going through `sem_ir()`.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user