This is an archive of the discontinued LLVM Phabricator instance.

[ArgPromotion] Rename variables according to the code style. NFC
ClosedPublic

Authored by psamolysov on Apr 13 2022, 1:25 AM.

Details

Summary

Some loop counters ('i', 'e') and variables ('type') were named not in
accordance with the code style and clang-tidy issues warnings about
the using of such variables. This patch renames the variables and fixes
some typos in the comments within the source file.

Diff Detail

Event Timeline

psamolysov created this revision.Apr 13 2022, 1:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 1:25 AM
psamolysov requested review of this revision.Apr 13 2022, 1:25 AM

Another typo in a comment has been fixed as well.

jdoerfert accepted this revision.Apr 13 2022, 7:27 AM

Thx! LG, one nit, see below.

llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
365

Make it I or something, not N. N is (for me) associated with the upper bound, also above.

This revision is now accepted and ready to land.Apr 13 2022, 7:27 AM
psamolysov marked an inline comment as done.Apr 13 2022, 8:44 AM

@jdoerfert Thank you for the comment. I would like to use a single-letter name in order not to reformat the code. What about J? If J doesn't sound good, I can propose M from member because this variable is an index of an element from a struct.

Rename N to J.

Rebased on the current main branch.

Colleagues, if you have no objections against the patch, could you help me with landing? I have no commit rights and cannot land the patch.

nikic added a comment.Apr 28 2022, 6:25 AM

Colleagues, if you have no objections against the patch, could you help me with landing? I have no commit rights and cannot land the patch.

Can you please share the Name <email> to use for the commit?

@nikic Thank you very much. Please, use Pavel Samolysov <samolisov@gmail.com>

This revision was landed with ongoing or failed builds.Apr 28 2022, 6:32 AM
This revision was automatically updated to reflect the committed changes.