mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SR-10972] swift-api-digester: avoid diagnosing the removal of __derived_enum_equals and __derived_struct_equals
These functions are compiler implementation details and diagnosing them is redundant and may be confusing to framework authors.
This commit is contained in:
@@ -1959,6 +1959,18 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
|
||||
}
|
||||
if (FoundInSuperclass)
|
||||
return;
|
||||
|
||||
// When diagnosing API changes, avoid complaining the removal of these
|
||||
// synthesized functions since they are compiler implementation details.
|
||||
// If an enum is no longer equatable, another diagnostic about removing
|
||||
// conforming protocol will be emitted.
|
||||
if (!Ctx.checkingABI()) {
|
||||
if (Node->getName() == Ctx.Id_derived_struct_equals ||
|
||||
Node->getName() == Ctx.Id_derived_enum_equals) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Node->emitDiag(diag::removed_decl, Node->isDeprecated());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user