Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions toolchain/check/cpp/thunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ auto IsCppThunkRequired(Context& context, const SemIR::Function& function)
for (auto* param : decl->parameters()) {
if (param->getType()->isReferenceType()) {
thunk_required = true;
break;
}
}
}
Expand All @@ -129,12 +130,10 @@ auto IsCppThunkRequired(Context& context, const SemIR::Function& function)
if (param_id == SemIR::ErrorInst::InstId) {
return false;
}
if (!thunk_required &&
thunk_required =
thunk_required ||
Comment on lines +133 to +134
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
thunk_required =
thunk_required ||
thunk_required |=

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe same above on L125

IsThunkRequiredForType(
context,
context.insts().GetAs<SemIR::AnyParam>(param_id).type_id)) {
thunk_required = true;
}
context, context.insts().GetAs<SemIR::AnyParam>(param_id).type_id);
}

return thunk_required;
Expand Down
Loading