-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[CodeGen] Use a range-based for loop (NFC) #97177
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
[CodeGen] Use a range-based for loop (NFC) #97177
Conversation
I++ in the loop might appear to indicate that the loop modifies the container in some way (deletion or insertion), but the loop just examines the container.
Isn't that loop just a |
It is. If we save the iterator range to a temporary variable, it may be doable. That is:
would become something like:
I sort of like the original code because |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/888 Here is the relevant piece of the build log for the reference:
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/917 Here is the relevant piece of the build log for the reference:
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/824 Here is the relevant piece of the build log for the reference:
|
I++ in the loop might appear to indicate that the loop modifies the container in some way (deletion or insertion), but the loop just examines the container.
I++ in the loop might appear to indicate that the loop modifies the
container in some way (deletion or insertion), but the loop just
examines the container.