ClangImporter: Adjust call to refactored clangSema.FindAllocationFunctions

See https://github.com/llvm/llvm-project/pull/113510
This commit is contained in:
Anthony Latsis
2025-06-11 17:52:58 +01:00
parent 01296faed8
commit 7094873882

View File

@@ -2560,13 +2560,13 @@ SwiftDeclSynthesizer::synthesizeStaticFactoryForCXXForeignRef(
clang::FunctionDecl *operatorNew = nullptr;
clang::FunctionDecl *operatorDelete = nullptr;
bool passAlignment = false;
clang::ImplicitAllocationParameters IAP(clang::AlignedAllocationMode::No);
clang::Sema::SFINAETrap trap(clangSema);
bool findingAllocFuncFailed = clangSema.FindAllocationFunctions(
cxxRecordDeclLoc, clang::SourceRange(),
clang::AllocationFunctionScope::Both,
clang::AllocationFunctionScope::Both, cxxRecordTy, /*IsArray=*/false,
passAlignment, clang::MultiExprArg(), operatorNew, operatorDelete,
clang::AllocationFunctionScope::Both, cxxRecordTy, /*IsArray=*/false, IAP,
clang::MultiExprArg(), operatorNew, operatorDelete,
/*Diagnose=*/false);
if (trap.hasErrorOccurred() || findingAllocFuncFailed || !operatorNew ||
operatorNew->isDeleted() ||