njames93 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.

The `++` and `--` operators work on lvalues only(`std::end(Range)++` is usually 
a compiler error.), Therefore, in order to detect that, there would need to be 
some control flow logic in the check, Something along the lines of detecting 
setting a variable to `Range.end()` then looking for any calls to `operator++` 
on that variable. This logic definitely could be done and the results could 
catch many more questionable cases, but for the first version of this check I 
think it can be left out.

https://github.com/llvm/llvm-project/pull/99917
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to