mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
api-digester: avoid looking up node update table to collect renamed declarations
We could simply get the new name from the node annotation of the decl before renaming.
This commit is contained in:
@@ -1942,10 +1942,9 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
|
||||
return;
|
||||
}
|
||||
case NodeAnnotation::Rename: {
|
||||
auto *Count = UpdateMap.findUpdateCounterpart(Node)->getAs<SDKNodeDecl>();
|
||||
Node->emitDiag(diag::renamed_decl,
|
||||
Ctx.buffer((Twine(getDeclKindStr(Count->getDeclKind())) + " " +
|
||||
Count->getFullyQualifiedName()).str()));
|
||||
Ctx.buffer((Twine(getDeclKindStr(Node->getDeclKind())) + " " +
|
||||
Node->getAnnotateComment(NodeAnnotation::RenameNewName)).str()));
|
||||
return;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user