mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
swift-api-digester: detected getter/setter function to property updates should be explicit about the new property names instead of inferring them from old function name.
This commit is contained in:
@@ -1637,6 +1637,8 @@ class RemovedAddedNodeMatcher : public NodeMatcher, public MatchedNodeListener {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
R->annotate(NodeAnnotation::PropertyName);
|
||||
R->addAnnotateComment(NodeAnnotation::PropertyName, A->getPrintedName());
|
||||
foundMatch(R, A);
|
||||
return true;
|
||||
}
|
||||
@@ -1867,7 +1869,8 @@ class SameNameNodeMatcher : public NodeMatcher {
|
||||
return FuncPriority;
|
||||
} else {
|
||||
static NameMatchKind OtherPriority[] = { NameMatchKind::PrintedNameAndUSR,
|
||||
NameMatchKind::PrintedName };
|
||||
NameMatchKind::PrintedName,
|
||||
NameMatchKind::USR };
|
||||
return OtherPriority;
|
||||
}
|
||||
}
|
||||
@@ -2455,6 +2458,9 @@ class DiffItemEmitter : public SDKNodeVisitor {
|
||||
return Node->getAnnotateComment(NodeAnnotation::ModernizeEnum);
|
||||
case NodeAnnotation::Rename:
|
||||
return Node->getAnnotateComment(NodeAnnotation::RenameNewName);
|
||||
case NodeAnnotation::GetterToProperty:
|
||||
case NodeAnnotation::SetterToProperty:
|
||||
return Node->getAnnotateComment(NodeAnnotation::PropertyName);
|
||||
default:
|
||||
return StringRef();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user