Open Quuxplusone opened 9 years ago
Attached RIRF49.zip
(73491 bytes, application/zip): test suite
Test cases RIRF50, RIRF51, RIRF52, RIRF53, and RIRF55 also fail for the same reason.
Fixed in r248994.
This still fails when the code tests for end != it instead of it != end
std::vector<int> c;
c.push_back('f');
c.push_back('o');
c.push_back('o');
int sum = 0;
// #TEST#: RIRF50 Replace iterative for with range for
for (std::vector<int>::const_iterator it = c.cbegin(), end = c.cend();
end != it; ++it)
{
sum += *it;
}
To reproduce:
git clone https://github.com/LegalizeAdulthood/refactor-test-suite
cd refactor-test-suite
Use CMake to generate build with compile_commans.json
Apply clang-tidy to file ReplaceIterativeForWithRangeFor.cpp
Check test cases RIRF50, RIRF51, RIRF52, RIRF53, and RIRF55
Test case RIRF49 now passes.
RIRF49.zip
(73491 bytes, application/zip)