https://github.com/unterumarmung commented:

Could we add tests for nested statement expressions and overloaded `operator=`?

For example, `if (({ x = 1; ({ y = 2; y; }); }))` should not warn, since 
neither assignment is the final expression.

On the other hand, `if (({ x = 1; ({ y = 2; }); }))` should warn only for `y = 
2`, and `if (({ ({ x = 1; }); }))` should warn for `x = 1`.

It would be worth checking that overloaded assignment follows the same rules.

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

Reply via email to