This is an archive of the discontinued LLVM Phabricator instance.

[NFC][Analyzer] Use range based for loop.
ClosedPublic

Authored by junaire on Feb 6 2022, 8:28 PM.

Details

Summary

Use range base loop loop to improve code readability.

Diff Detail

Event Timeline

junaire created this revision.Feb 6 2022, 8:28 PM
junaire requested review of this revision.Feb 6 2022, 8:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2022, 8:28 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
junaire edited reviewers, added: NoQ, steakhal; removed: zaks.anna.Feb 6 2022, 10:59 PM
steakhal accepted this revision.Feb 6 2022, 11:29 PM

Hmm, I guess you must take it by mutable reference since you push it to LocalTUDecls.
Thanks for the patch. Do you have push permissions? Otherwise, send me your name <email> to let me commit this on your behalf.

Do you plan to clean up other loops as well?

This revision is now accepted and ready to land.Feb 6 2022, 11:29 PM

Hmm, I guess you must take it by mutable reference since you push it to LocalTUDecls.
Thanks for the patch. Do you have push permissions? Otherwise, send me your name <email> to let me commit this on your behalf.

Thanks for the feedback! I have commit access so I can push it on my own. :^)

Do you plan to clean up other loops as well?

I'm a student and I'm learning clang static analyzer so I may send more patches. (of course including cleaning up work like this one)

This revision was automatically updated to reflect the committed changes.