mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #11660 from nkcsgexi/code-expand-trailing
This commit is contained in:
@@ -1481,8 +1481,13 @@ private:
|
||||
bool walkToStmtPre(Stmt *S) override {
|
||||
auto SR = S->getSourceRange();
|
||||
if (SR.isValid() && SM.rangeContainsTokenLoc(SR, TargetLoc)) {
|
||||
if (!EnclosingCall && !isa<BraceStmt>(S))
|
||||
OuterStmt = 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