Skip to content

[NFC] Extract helper for making integer literals #17282

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
Jun 21, 2018
Merged

[NFC] Extract helper for making integer literals #17282

merged 1 commit into from
Jun 21, 2018

Conversation

beccadax
Copy link
Contributor

Several different places in the compiler synthesize IntegerLiteralExprs from computed unsigned variables; each one requires several lines of code and does things slightly differently. This pull request creates one helper function, IntegerLiteralExpr::createFromUnsigned(), and changes those four places to use it.

All four of the call sites are in Sema, but I couldn't find a good place for this in that library.

Just a little refactoring I pulled out of a larger project.

Several different places in the codebase synthesize IntegerLiteralExprs from computed unsigned variables; each one requires several lines of code and does things slightly differently. Write one central helper method to handle this.
@CodaFi
Copy link
Contributor

CodaFi commented Jun 21, 2018

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit bb08e60 into swiftlang:master Jun 21, 2018
@beccadax beccadax deleted the literally-unreadable branch June 22, 2018 19:30
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.

4 participants