mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 13:01:05 +01:00
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:
@@ -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 _): {
|
||||
|
||||
Reference in New Issue
Block a user