Skip to content

[SourceKit] Fix placeholder expansion not working inside #if #26036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

nathawes
Copy link
Contributor

@nathawes nathawes commented Jul 9, 2019

Update the PlaceholderFinder ASTWalker to walk into the clauses of IfConfigDecls. It wasn't previously, resulting in any placeholders there not being expanded.

Also update CallExprFinder (used to determine if expansions should use trailing closure syntax) to walk into inactive if-config clauses. Previously it only walked into active regions, so expansions would never use trailing closure syntax in inactive regions.

Resolves rdar://problem/51995648

Update the PlaceholderFinder ASTWalker to walk into the clauses of
IfConfigDecls. It wasn't previously, resulting in any placeholders there not
being expanded.

Also update CallExprFinder (used to determine if expansions should use trailing
closure syntax) to walk into inactive if-config clauses. Previously it only
walked into active regions, so expansions never used trailing closure syntax in
inactive regions.

Resolves rdar://problem/51995648
@nathawes nathawes requested a review from nkcsgexi July 9, 2019 21:20
@nathawes
Copy link
Contributor Author

nathawes commented Jul 9, 2019

@swift-ci please test

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathawes nathawes merged commit 4c5239e into swiftlang:master Jul 9, 2019
@nathawes nathawes deleted the r51995648-placeholder-not-working-inside-pound-if branch July 9, 2019 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants