[clang-tools-extra] Create a new check to look for mis-use in calls that take iterators (PR #99917)

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 09:00:11 PDT 2024


5chmidti wrote:

The `++` and `--` operators could be mis-used as well, similar to `+` and `-`. And there are some control statements with a single statement that has a compound statement around it, please remove those.

Checking the log, it looks like the check works well.

I know that TBB has `begin` and `end` members that return integral types. But I'm not sure that we need to exclude checking for integral types. E.g., `a.end() + 1` could still be bupgrone, even if `end` returns an `int`.

https://github.com/llvm/llvm-project/pull/99917


More information about the cfe-commits mailing list