vabridgers wrote:

> The tests only utilize assignments involving literals. It should also test 
> something like this:
> 
> ```c++
> int func();
> 
> void test() {
>     int i = func();
>     if (true) {
>         i = 0;
>     }
> }
> ```
> 
> Since it is not known if the call has any side effects it should not be 
> suggested. If the implementation were visible it could be determined but I 
> think such assignments should be completely excluded for now and left for a 
> follow-up (and have a tunable).

I believe I've address this and added a test case.

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