mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -3012,10 +3012,8 @@ FuncDecl *SwiftDeclSynthesizer::findExplicitDestroy(
|
||||
ctx.evaluator,
|
||||
CxxValueSemantics({clangType->getTypeForDecl(), &ImporterImpl}), {});
|
||||
|
||||
if (valueSemanticsKind == CxxValueSemanticsKind::MoveOnly)
|
||||
return destroyFunc;
|
||||
|
||||
if (valueSemanticsKind != CxxValueSemanticsKind::Copyable)
|
||||
if (valueSemanticsKind != CxxValueSemanticsKind::Copyable &&
|
||||
valueSemanticsKind != CxxValueSemanticsKind::MoveOnly)
|
||||
return nullptr;
|
||||
|
||||
auto cxxRecordSemanticsKind = evaluateOrDefault(
|
||||
@@ -3034,6 +3032,9 @@ FuncDecl *SwiftDeclSynthesizer::findExplicitDestroy(
|
||||
}
|
||||
}
|
||||
|
||||
if (valueSemanticsKind == CxxValueSemanticsKind::MoveOnly)
|
||||
return destroyFunc;
|
||||
|
||||
markDeprecated(
|
||||
nominal,
|
||||
"destroy operation '" +
|
||||
|
||||
Reference in New Issue
Block a user