[PATCH] D32682: Refactoring with range-based for, NFC
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 14:58:44 PDT 2017
spatel added a comment.
IMO, this is going beyond LLVM's normal 'auto' usage prefs:
http://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable
If you can convert it to a range-loop, then you should specify the range element type including 'const' where appropriate. So something like this:
for (const SDValue &Op : NI->op_values())
Some of the diffs use regular loops and only replace the iterator type with an 'auto'. That should be a separate NFC patch. But it's not clear to me if that also goes too far into 'auto'.
https://reviews.llvm.org/D32682
More information about the llvm-commits
mailing list