mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 10:36:48 +00:00
C++ Interop: Don't crash when trying to call a C++ function with undeduced return type (#6363)
This crashed on trying to build a C++ thunk because the error wasn't propagated. Part of #5436.
This commit is contained in:
1 parent
5ae5170421
commit
2ad26487b6
2 files changed
+23
No files matched your search
@@ -1546,6 +1546,9 @@ static auto GetReturnPattern(Context& context, SemIR::LocId loc_id,
|
||||
// void.
|
||||
return SemIR::InstId::None;
|
||||
}
|
||||
if (type_inst_id == SemIR::ErrorInst::TypeInstId) {
|
||||
return SemIR::ErrorInst::InstId;
|
||||
}
|
||||
auto pattern_type_id = GetPatternType(context, type_id);
|
||||
clang::SourceLocation return_type_loc =
|
||||
clang_decl->getReturnTypeSourceRange().getBegin();
|
||||
|
||||
Reference in new issue
Block a user