mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #11660 from nkcsgexi/code-expand-trailing
This commit is contained in:
@@ -81,3 +81,10 @@ func f1() {
|
||||
// CHECK: bar(a : {}}, <#T##d: () -> ()##() -> ()#>)
|
||||
|
||||
foo(withDuration: 1, animations: <#T##() -> Void#>)
|
||||
|
||||
if true {
|
||||
withtrail(<#T##() -> ()#>)
|
||||
// CHECK: withtrail {
|
||||
// CHECK-NEXT: <#code#>
|
||||
}
|
||||
}
|
||||
@@ -1481,9 +1481,14 @@ private:
|
||||
bool walkToStmtPre(Stmt *S) override {
|
||||
auto SR = S->getSourceRange();
|
||||
if (SR.isValid() && SM.rangeContainsTokenLoc(SR, TargetLoc)) {
|
||||
if (!EnclosingCall && !isa<BraceStmt>(S))
|
||||
if (!EnclosingCall) {
|
||||
if (isa<BraceStmt>(S))
|
||||
// In case OuterStmt is already set, we should clear it to nullptr.
|
||||
OuterStmt = nullptr;
|
||||
else
|
||||
OuterStmt = S;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user