refactors PerformCppOverloadResolution to take CppOverloadSet (#6829)

`PerformCppOverloadResolution` computes an overload set from a
`CppOverloadSetId`, but the compiler sometimes needs to synthesise a
local overload set for witnesses. `PerformCppOverloadResolution` now
requires callers to produce the `CppOverloadSet` to address this
problem.
This commit is contained in:
Christopher Di Bella
2026-03-04 19:02:33 +00:00
committed by GitHub
parent 1c7a4030ab
commit b28e899a8c
3 changed files with 5 additions and 8 deletions
+3 -3
View File
@@ -57,9 +57,9 @@ auto PerformCallToCppFunction(Context& context, SemIR::LocId loc_id,
bool is_operator_syntax) -> SemIR::InstId {
auto [template_arg_ids, function_arg_ids] =
SplitCallArgumentList(context, arg_ids);
auto callee_id =
PerformCppOverloadResolution(context, loc_id, overload_set_id,
template_arg_ids, self_id, function_arg_ids);
auto callee_id = PerformCppOverloadResolution(
context, loc_id, context.cpp_overload_sets().Get(overload_set_id),
template_arg_ids, self_id, function_arg_ids);
SemIR::Callee callee = GetCallee(context.sem_ir(), callee_id);
CARBON_KIND_SWITCH(callee) {
case CARBON_KIND(SemIR::CalleeError _): {