Warning is generated because the range based for-loop is always copying by value but uses a ref &:
[4083/4581] Building CXX object tools/llvm-mca/CMakeFiles/llvm-mca.dir/Views/InstructionInfoView.cpp.o /path/to/Projects/llvm-project/llvm/tools/llvm-mca/Views/InstructionInfoView.cpp:96:20: warning: loop variable 'I' is always a copy because the range of type 'detail::zippy<detail::zip_shortest, ArrayRef<MCInst>, MutableArrayRef<InstructionInfoViewData> &>' does not return a reference [-Wrange-loop-analysis] for (const auto &I : zip(getSource(), IIVD)) { ^ /path/to/Projects/llvm-project/llvm/tools/llvm-mca/Views/InstructionInfoView.cpp:96:8: note: use non-reference type 'std::__1::tuple<const llvm::MCInst &, llvm::mca::InstructionInfoView::InstructionInfoViewData &>' for (const auto &I : zip(getSource(), IIVD)) { ^~~~~~~~~~~~~~~ 1 warning generated.