Skip to content

Commit 7a99da3

Browse files
authored
Merge pull request #24817 from nkcsgexi/digester-avoid-update
api-digester: avoid looking up node update table to collect renamed declarations. NFC
2 parents 52fab94 + 99caadf commit 7a99da3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

test/api-digester/Outputs/Cake-abi.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cake1: InfixOperator ..*.. has been changed to a PrefixOperator
2424
cake1: Protocol ProtocolToEnum has been changed to a Enum
2525

2626
/* Renamed Decls */
27-
cake1: Func S1.foo5(x:y:) has been renamed to Func S1.foo5(x:y:z:)
27+
cake1: Func S1.foo5(x:y:) has been renamed to Func foo5(x:y:z:)
2828
cake1: Struct Somestruct2 has been renamed to Struct NSSomestruct2
2929

3030
/* Type Changes */

test/api-digester/Outputs/Cake.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cake1: InfixOperator ..*.. has been changed to a PrefixOperator
2323
cake1: Protocol ProtocolToEnum has been changed to a Enum
2424

2525
/* Renamed Decls */
26-
cake1: Func S1.foo5(x:y:) has been renamed to Func S1.foo5(x:y:z:)
26+
cake1: Func S1.foo5(x:y:) has been renamed to Func foo5(x:y:z:)
2727
cake1: Struct Somestruct2 has been renamed to Struct NSSomestruct2
2828

2929
/* Type Changes */

tools/swift-api-digester/swift-api-digester.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,10 +1942,9 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
19421942
return;
19431943
}
19441944
case NodeAnnotation::Rename: {
1945-
auto *Count = UpdateMap.findUpdateCounterpart(Node)->getAs<SDKNodeDecl>();
19461945
Node->emitDiag(diag::renamed_decl,
1947-
Ctx.buffer((Twine(getDeclKindStr(Count->getDeclKind())) + " " +
1948-
Count->getFullyQualifiedName()).str()));
1946+
Ctx.buffer((Twine(getDeclKindStr(Node->getDeclKind())) + " " +
1947+
Node->getAnnotateComment(NodeAnnotation::RenameNewName)).str()));
19491948
return;
19501949
}
19511950
default:

0 commit comments

Comments
 (0)