mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 03:50:28 +00:00
Support for converting a function to a C++ function pointer (#7789)
This commit is contained in:
1 parent
cbdd6cee65
commit
c0bd9606de
26 files changed
+1030
-446
No files matched your search
@@ -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