Reorder the code in a more logical and understandable way.
Details
Diff Detail
Event Timeline
clang-tidy/modernize/LoopConvertCheck.cpp | ||
---|---|---|
419 | Now you can make that early exit! | |
494–495 | I assume the change in the tests is due to the bug here? :) | |
498 | I'd give the intermediate result a different name. | |
533–534 | I think we still want to split up this function. The if() {} else {} blocks are too long ... | |
534 | This sentence doesn't parse. | |
534–536 | I think an example might help this comment. Here and elsewhere ;) | |
535–536 | Perhaps add: , because we need to keep the code correct if it mutates the returned objects | |
536 | LLVM uses FIXME; also, "Think about this" is not a good todo ;) They need to be more specific (or delete it). | |
542 | That comment doesn't give information, I think. I'd delete it. | |
559–560 | I liked the early continue better... | |
clang-tidy/modernize/LoopConvertCheck.h | ||
34 | I'd probably make that a std::string - having references in members is a frequent cause for bugs. |
clang-tidy/modernize/LoopConvertCheck.cpp | ||
---|---|---|
494–495 | I'm not sure if it was a bug or just different priorities, but that's not reason. "DerefByValue" is a weird case and we don't have many tests for that. The change is due to: If the initializer and variable have both the same type just use auto At line 726 (somewhere inside the iterator loops logic). I removed the conditional because we always want to check for const qualification. |
I'd probably make that a std::string - having references in members is a frequent cause for bugs.