steakhal wrote:

> Thanks for the insight. Take your time.

So, I spent a few hours experimenting and it's really difficult to do, only 
using `ExprSequence`.
Just to recap, my idea was to match the assignments and inc/dec unary operator 
calls to detect if the container or the key object is mutated.
Then partition the lookup events if any of the lookups were "separated" by such 
a mutation.
Then check if the remaining group has at least 2 lookups, if so, report them.

It got fairly complicated and still buggy. I definitely think it's achievable, 
it's just too much that I could invest into.

So, let's say, I'd stick with the current version of [this 
branch](https://github.com/steakhal/llvm-project/tree/bb/tidy-add-redundant-lookup-check),
 what would be left to continue the review? @firewave 

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

Reply via email to