Merge pull request #74619 from swiftlang/egorzhdan/std-function-inout

[cxx-interop] Instantiate the `std::function` constructor with a const pointer argument
This commit is contained in:
Egor Zhdan
2024-06-21 20:39:25 +01:00
committed by GitHub

View File

@@ -1059,7 +1059,7 @@ void swift::conformToCxxFunctionIfNeeded(
auto funcPointerType = clangCtx.getPointerType(clangCtx.getFunctionType(
operatorCallDecl->getReturnType(), operatorCallParamTypes,
clang::FunctionProtoType::ExtProtoInfo()));
clang::FunctionProtoType::ExtProtoInfo())).withConst();
// Create a fake variable with a function type that matches the type of
// `operator()`.