mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[migrator] Add a viewer utility for child indices to facilitate access. NFC (#8925)
This commit is contained in:
@@ -59,6 +59,11 @@ CommonDiffItem(SDKNodeKind NodeKind, NodeAnnotation DiffKind,
|
||||
RightUsr(RightUsr), LeftComment(LeftComment),
|
||||
RightComment(RightComment), ModuleName(ModuleName) {
|
||||
assert(!ChildIndex.empty() && "Child index is empty.");
|
||||
llvm::SmallVector<StringRef, 4> Pieces;
|
||||
ChildIndex.split(Pieces, ":");
|
||||
std::transform(Pieces.begin(), Pieces.end(),
|
||||
std::back_inserter(ChildIndexPieces),
|
||||
[](StringRef Piece) { return std::stoi(Piece); });
|
||||
}
|
||||
|
||||
StringRef swift::ide::api::CommonDiffItem::head() {
|
||||
|
||||
Reference in New Issue
Block a user