aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2018-12-10 15:16:37 +0000
committerMichael Kruse <llvm@meinersbur.de>2018-12-10 15:16:37 +0000
commit6b25c694332abf37b4fdd9e0c15139a921172b35 (patch)
tree81d7af924bf297ecd9e98024d32717754e80d499 /tools
parent9db90514610de6a64b71f9fa7f115437aa3d83d3 (diff)
Use zip_longest for iterator range comparisons. NFC.
Use zip_longest in two locations that compare iterator ranges. zip_longest allows the iteration using a range-based for-loop and to be symmetric over both ranges instead of prioritizing one over the other. In that latter case code have to handle the case that the first is longer than the second, the second is longer than the first, and both are of the same length, which must partially be checked after the loop. With zip_longest, this becomes an element comparison within the loop like the comparison of the elements themselves. The symmetry makes it clearer that neither the first and second iterators are handled differently. The iterators are not event used directly anymore, just the ranges. Differential Revision: https://reviews.llvm.org/D55468 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions