[PATCH] D83351: [llvm-reduce] Reducing attributes

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 12:05:28 PDT 2020


dblaikie added a comment.

In D83351#2139751 <https://reviews.llvm.org/D83351#2139751>, @lebedev.ri wrote:

> There's also `llvm::for_each()` with 40 uses.


Still a very tiny fraction of all iterations. I expect most (or at least an order of magnitude or two more than the <100 for_each()s) of those iterations don't depend on the order of iteration - so I don't think it provides the signal you're thinking of, at least not to enough other developers to be useful - making the code quirky/different in a way that I think is likely to be confusing to other readers ("Why isn't this a range-based for loop? is there some subtle difference in behavior that the author intended that I'm not understanding?" & there isn't)

> Can you please quote specific part of the whatever documentation you believe dictates this?
>  If there isn't one, i'd like to see `ProgrammersManual` patch.

Perhaps this is sufficient: https://llvm.org/docs/CodingStandards.html#use-range-based-for-loops-wherever-possible


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83351/new/

https://reviews.llvm.org/D83351





More information about the llvm-commits mailing list