@@ -546,6 +546,16 @@ class SDKTreeDiffPass {
546
546
}// End of anonymous namespace
547
547
548
548
namespace {
549
+
550
+ static bool isMissingDeclAcceptable (const SDKNodeDecl *D) {
551
+ // Don't complain about removing importation of SwiftOnoneSupport.
552
+ if (D->getKind () == SDKNodeKind::DeclImport &&
553
+ D->getName () == " SwiftOnoneSupport" ) {
554
+ return true ;
555
+ }
556
+ return false ;
557
+ }
558
+
549
559
static void diagnoseRemovedDecl (const SDKNodeDecl *D) {
550
560
if (D->getSDKContext ().checkingABI ()) {
551
561
// Don't complain about removing @_alwaysEmitIntoClient if we are checking ABI.
@@ -559,9 +569,7 @@ static void diagnoseRemovedDecl(const SDKNodeDecl *D) {
559
569
if (Ctx.getOpts ().SkipRemoveDeprecatedCheck &&
560
570
D->isDeprecated ())
561
571
return ;
562
- // Don't complain about removing importation of SwiftOnoneSupport.
563
- if (D->getKind () == SDKNodeKind::DeclImport &&
564
- D->getName () == " SwiftOnoneSupport" ) {
572
+ if (isMissingDeclAcceptable (D)) {
565
573
return ;
566
574
}
567
575
D->emitDiag (SourceLoc (), diag::removed_decl, false );
@@ -1705,6 +1713,8 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
1705
1713
.findUpdateCounterpart (Node))) {
1706
1714
DiagLoc = CD->getLoc ();
1707
1715
}
1716
+ if (isMissingDeclAcceptable (Node))
1717
+ return ;
1708
1718
Node->emitDiag (DiagLoc, diag::renamed_decl,
1709
1719
Ctx.buffer ((Twine (getDeclKindStr (Node->getDeclKind (),
1710
1720
Ctx.getOpts ().CompilerStyle )) + " " +
0 commit comments