mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit][CodeFormat] Awake the indent-sibling test after coping with the recent updates on AST representation of parameters.
This commit is contained in:
@@ -1899,7 +1899,7 @@ class FormatWalker: public ide::SourceEntityWalker {
|
||||
if (EleStart.isInvalid()) {
|
||||
EleStart = TE->getElement(I)->getStartLoc();
|
||||
}
|
||||
addPair(TE->getElement(I)->getEndLoc(), EleStart, tok::comma);
|
||||
addPair(TE->getElement(I)->getEndLoc(), FindAlignLoc(EleStart), tok::comma);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1917,8 +1917,9 @@ class FormatWalker: public ide::SourceEntityWalker {
|
||||
// Function parameters are siblings.
|
||||
for (auto P : AFD->getParameterLists()) {
|
||||
for (auto param : *P) {
|
||||
addPair(param->getEndLoc(),
|
||||
FindAlignLoc(param->getStartLoc()), tok::comma);
|
||||
if (!param->isSelfParameter())
|
||||
addPair(param->getEndLoc(), FindAlignLoc(param->getStartLoc()),
|
||||
tok::comma);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user