-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Cleanup to lsra inspired by #73424 #73589
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsInspired by comments (here and here)
|
It might be nice to remove the |
It built fine on the first try - thanks for the recommendation. |
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Inspired by comments (here and here)
RefPosition* currentRefPosition = &reverseIterator
as it creates two variables that are essentially the same, especially since the iterator has operators like->
. In fact, I had to spend a bit of time verifying that there weren't any updates to one but not the other in the code. (And actually Fix undefined behavior found with g++-12 ubsan #73424 did slightly impact this relationship since it moved the assignment from the loop iteration step to the loop body, but I don't believe that this mattered.)I renamed the "iterator" variable to the "position" name to reduce textual churn in the code. This didn't work as well for the range-based loops since they yield -references- to the underlying object so a bunch of C++ punctuation changes.
for
conditions and remove duplication between the condition and the loop body. Search forcontinueLoop
to see them.operator&
on each iterator since they are no longer used and not part of normal iterators.