Fixes some usages of the "auto" keyword to avoid creation of copies.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp | ||
---|---|---|
857 ↗ | (On Diff #507621) | I notice in https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable, the example code show "auto &Val". Should we follow the same style "auto &Pair". Ditto for others? |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
20966 | Doesn't the deference operator for enumerate return by value? |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
20966 | So I'm not sure this is really preventing a copy. |
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp | ||
---|---|---|
857 ↗ | (On Diff #507631) | @craig.topper, how about this one? Does the iteration return reference? For basic practice "auto &" is better than "auto"? |
Doesn't the deference operator for enumerate return by value?