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:
Xi Ge
2019-05-15 17:20:44 -07:00
parent 165133e3dd
commit 99caadf794
3 changed files with 4 additions and 5 deletions

View File

@@ -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: