5chmidti wrote: > @5chmidti What does `a new check diagnoses `it++`vs`++it` (where possible)` > mean?
I mean this pattern: ```c++ void foo(std::string str) { auto iter = str.begin(); iter++; // prefer ++iter; ++iter; sink(iter++); sink(++iter); for (auto i = str.begin(); i != str.end(); ++i) {} for (auto i = str.begin(); i != str.end(); i++) {} // prefer ++i } ``` Where people write `i++` but they really mean `++i`. My question is if this check should ignore both of these cases, or if another check should detect this. https://github.com/llvm/llvm-project/pull/84922 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits