mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Support for converting a function to a C++ function pointer (#7789)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user