Skip to content

[AST] Add method to create an implicit SwitchStmt #36973

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

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 20, 2021

There are a number of occurances that create implicit SwitchStmts by passing SourceLoc() for all location paramters. Refactor those occurrences out to a separate createImplicit method that automatically fills the locations with invalid source locations.

As discussed here: #36930 (comment).

@ahoppen ahoppen requested a review from rintaro April 20, 2021 18:32
Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

👍

@rintaro
Copy link
Member

rintaro commented Apr 20, 2021

(typo in the commit message SwiftStmtSwitchStmt)

There are a number of occurances that create implicit `Switch`s by passing `SourceLoc()` for all location paramters. Refactor those occurances out to a separate `createImplicit` method that automatically fills the locations with invalid source locations.
@ahoppen ahoppen force-pushed the pr/create-implicit-switch-stmt branch from c3c6fb9 to aa69529 Compare April 20, 2021 20:34
@ahoppen
Copy link
Member Author

ahoppen commented Apr 20, 2021

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - aa69529

@ahoppen
Copy link
Member Author

ahoppen commented Apr 21, 2021

@swift-ci Please test macOS

@ahoppen ahoppen changed the title [AST] Add method to create an implicit SwiftStmt [AST] Add method to create an implicit SwitchStmt Apr 21, 2021
@ahoppen ahoppen merged commit 1504870 into swiftlang:main Apr 22, 2021
@ahoppen ahoppen deleted the pr/create-implicit-switch-stmt branch April 22, 2021 09:46
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.

3 participants