If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Add an analysis to detect unneeded copies in ranged for loops

RESOLVED DUPLICATE of bug 1126813

Status

()

Core
Rewriting and Analysis
RESOLVED DUPLICATE of bug 1126813
3 years ago
2 years ago

People

(Reporter: jrmuizel, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
class LargeClass {
...
}

vector<LargeClass> list;

we want to do detect:

for (auto l : list) {
   ...
}

and suggest:

for (const auto l& : list) {
   ...
}

----

This maybe be tricky to get right and avoid any false positives.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1126813
You need to log in before you can comment on or make changes to this bug.