Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm not particularly familiar with much of this code, but it seems to me likely that it's not always the case that you should use const & for several of these, no more than you would if you were passing them in as function parameters. Unfortunately, the use of auto (often in violation of my undersetanding of the LLVM coding standards on auto usage) makes it hard to tell what the situation is.
llvm/lib/ObjCopy/ELF/ELFObject.cpp | ||
---|---|---|
2073 | This is probably unnecessary, though it can't hurt: it's a std::pair of two things that are designed to be passed by value, so hardly costly to copy (and will likely be a no-op change in optimized builds, at a guess). | |
llvm/tools/llvm-readobj/ObjDumper.h | ||
55 | FWIW, I wouldn't normally pass around a std::function by reference. |
This kind of blindly applying clang-tidy -checks='-*,performance-for-range-copy' --fix changes is easy for the contributor but is time consuming for reviewers.
Anyway, I have applied appropriated fixes to places where const auto & is not the best.
This is probably unnecessary, though it can't hurt: it's a std::pair of two things that are designed to be passed by value, so hardly costly to copy (and will likely be a no-op change in optimized builds, at a guess).