Skip to content
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

[SR-14138] Replace uses of std::transform with llvm::transform where applicable #56518

Closed
typesanitizer opened this issue Feb 1, 2021 · 6 comments
Labels
compiler The Swift compiler in itself good first issue Good for newcomers task

Comments

@typesanitizer
Copy link

Previous ID SR-14138
Radar rdar://problem/73818365
Original Reporter @typesanitizer
Type Task
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Task, StarterBug
Assignee cypherean (JIRA)
Priority Medium

md5: 800dc234b780460d301595d210ec43f7

Issue Description:

In many places, the code is using std::transform(x.begin(), x.end() ...). This can be replaced with llvm::transform(x, ...) to simplify the code a little bit. [Note that this won't be a valid replacement if the iteration isn't happening from the beginning to the end.]

You may need to add a #include "llvm/ADT/STLExtras.h" for certain files for this to work, since that's where llvm::transform is defined.

Since this is a pure refactoring, no new test cases are needed.

@typesanitizer
Copy link
Author

Feel free to tag me for review on GitHub (@ varungandhi-apple), or ask any questions you might have here. This change should be hopefully simple to implement, the main task in some sense that you can build the compiler properly by following the instructions in the Readme and the Getting Started guide. Feel free to ask build-related questions as well, if you're facing issues with it.

@swift-ci create

@swift-ci
Copy link
Collaborator

swift-ci commented Feb 1, 2021

Comment by Shreya Sharma (JIRA)

Hello,

I'll be working on this issue.

@typesanitizer
Copy link
Author

Sounds good.

@swift-ci
Copy link
Collaborator

swift-ci commented Feb 4, 2021

Comment by Shreya Sharma (JIRA)

I've made a PR for the changes https://github.com/apple/swift/pull/35757. The tests are still pending, but they passed locally.

I'm new to swift forum, is there somewhere I can introduce myself?

@typesanitizer
Copy link
Author

We have the Development Category on the forums in case you have questions. I'm not sure if we've had people introduce themselves before in an explicit thread there, but if you're interested in contributing and would like to start a conversation and get to know people, I think that creating a thread in that category should be okay.

There is also the Women in Swift group. https://forums.swift.org/g/Women-in-Swift If you'd like to be added to it, you can message @hborla or one of the other group owners. They do have explicit introduction threads and I'm told they are "extremely wholesome". 🙂

@swift-ci
Copy link
Collaborator

swift-ci commented Feb 5, 2021

Comment by Shreya Sharma (JIRA)

Thank you 🙂

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself good first issue Good for newcomers task
Projects
None yet
Development

No branches or pull requests

2 participants