Support for converting a function to a C++ function pointer (#7789)

This commit is contained in:
Geoff Romer
2026-09-30 21:13:36 +00:00
committed by GitHub
parent cbdd6cee65
commit c0bd9606de
26 changed files with 1030 additions and 446 deletions
+6
View File
@@ -133,6 +133,12 @@ static auto BuildCopyWitness(Context& context, SemIR::LocId loc_id,
-> SemIR::InstId {
auto& clang_sema = context.clang_sema();
if (context.constant_values().InstIs<SemIR::CppFunctionPointerType>(
query_self_const_id)) {
return BuildPrimitiveCopyWitness(context, loc_id, query_self_const_id,
query_specific_interface);
}
auto* tag_decl = TypeAsTagDecl(context, query_self_const_id);
if (!tag_decl) {
return SemIR::InstId::None;