Don't require ref tags in thunks (#7115)

This enables thunking to work when the function has `ref` parameters,
without jumping through hoops to add `ref` tags in the desugared
function body.

This also renames `is_operator_syntax` to `is_desugared`, which is more
general and more accurate.
This commit is contained in:
Geoff Romer
2026-04-29 18:33:53 +00:00
committed by GitHub
parent 4c9049346d
commit bd6aeae9d4
11 changed files with 110 additions and 61 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ auto PerformCallToCppFunction(Context& context, SemIR::LocId loc_id,
SemIR::CppOverloadSetId overload_set_id,
SemIR::InstId self_id,
llvm::ArrayRef<SemIR::InstId> arg_ids,
bool is_operator_syntax) -> SemIR::InstId {
bool is_desugared) -> SemIR::InstId {
auto [template_arg_ids, function_arg_ids] =
SplitCallArgumentList(context, arg_ids);
auto callee_id = PerformCppOverloadResolution(
@@ -73,7 +73,7 @@ auto PerformCallToCppFunction(Context& context, SemIR::LocId loc_id,
fn.self_id = self_id;
}
return PerformCallToFunction(context, loc_id, callee_id, fn,
function_arg_ids, is_operator_syntax);
function_arg_ids, is_desugared);
}
case CARBON_KIND(SemIR::CalleeCppOverloadSet _): {
CARBON_FATAL("overloads can't be recursive");