swift-api-digester: avoid reporting moved constructors. rdar://31694119 (#8885)

They don't make more sense than renamed decls.
This commit is contained in:
Xi Ge
2017-04-20 12:48:17 -07:00
committed by GitHub
parent 0b3544b4fa
commit b089bab40e
4 changed files with 15 additions and 4 deletions

View File

@@ -2756,10 +2756,11 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
switch(Anno) {
case NodeAnnotation::Removed: {
if (auto *Added = findAddedDecl(Node)) {
MovedDecls.Diags.emplace_back(Node->getDeclKind(),
Added->getDeclKind(),
Node->getFullyQualifiedName(),
Added->getFullyQualifiedName());
if (Node->getDeclKind() != DeclKind::Constructor)
MovedDecls.Diags.emplace_back(Node->getDeclKind(),
Added->getDeclKind(),
Node->getFullyQualifiedName(),
Added->getFullyQualifiedName());
} else {
RemovedDecls.Diags.emplace_back(Node->getDeclKind(),
Node->getFullyQualifiedName(),