Skip to content

Commit 246541f

Browse files
committed
swift-api-digester: more strict when detecting moved declarations.
We've witnessed high positive rate in this case. rdar://31694080
1 parent 7bebc84 commit 246541f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,8 @@ void DiagnosisEmitter::collectAddedDecls(NodePtr Root,
26662666
SDKNodeDecl *DiagnosisEmitter::findAddedDecl(const SDKNodeDecl *Root) {
26672667
for (auto *Added : AddedDecls) {
26682668
if (Root->getKind() == Added->getKind() &&
2669-
Root->getPrintedName() == Added->getPrintedName())
2669+
Root->getPrintedName() == Added->getPrintedName() &&
2670+
Root->getUsr() == Added->getUsr())
26702671
return Added;
26712672
}
26722673
return nullptr;

0 commit comments

Comments
 (0)