[all-commits] [llvm/llvm-project] b9db89: [ADT][NFCI] Do not use non-const lvalue-refs with ...

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Mon Mar 13 17:59:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9db89fbcfdaece8656159a2a0f0a2f09cdd7db7
      https://github.com/llvm/llvm-project/commit/b9db89fbcfdaece8656159a2a0f0a2f09cdd7db7
  Author: Jakub Kuderski <kubak at google.com>
  Date:   2023-03-13 (Mon, 13 Mar 2023)

  Changed paths:
    M clang/tools/clang-refactor/TestSupport.cpp
    M llvm/lib/ObjectYAML/DWARFYAML.cpp
    M llvm/lib/ObjectYAML/MinidumpEmitter.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
    M llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
    M llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp

  Log Message:
  -----------
  [ADT][NFCI] Do not use non-const lvalue-refs with enumerate in llvm/

Replace references to `enumerate` results with either const lvalue
rerences or structured bindings. I did not use structured bindings
everywhere as it wasn't clear to me it would improve readability.

This is in preparation to the switch to `zip` semantics which won't
support non-const lvalue reference to elements:
https://reviews.llvm.org/D144503.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D145987




More information about the All-commits mailing list