https://github.com/zeyi2 commented:

If I understand the implementation correctly, there are some inconsistencies 
regarding how variable modifications are detected:

- In Step 5, the check only checks `UnaryOperator` (ignoring `+=`, `-=`), which 
could lead to false positives (unsafe moves).
- In Step 9, the check only checks `BinaryOperator` (ignoring `++`, `--`) and 
fails to detect the most common i++ or i-- increments.

IMHO a more unified way to check for variable modifications is better. Can we 
make a helper function for it?

https://github.com/llvm/llvm-project/pull/175429
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to