Skip to content

Commit df1b631

Browse files
committed
ASTScope: Fix source range of ClosureParametersScope
The parameters are visible inside the source range that begins with the 'in' keyword and ends with the closure's closing brace.
1 parent 0ddd093 commit df1b631

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/AST/ASTScopeSourceRange.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,7 @@ SourceRange ClosureParametersScope::getSourceRangeOfThisASTNode(
456456
if (!omitAssertions)
457457
ASTScopeAssert(closureExpr->getInLoc().isValid(),
458458
"We don't create these if no in loc");
459-
return SourceRange(getStartOfFirstParam(closureExpr),
460-
closureExpr->getInLoc());
459+
return SourceRange(closureExpr->getInLoc(), closureExpr->getEndLoc());
461460
}
462461

463462
SourceRange

0 commit comments

Comments
 (0)