firewave wrote:

The tests only utilize assignments involving literals. It should also test 
something like this:

```cpp
int func();

void test() {
    int i = func();
    if (true) {
        i = 0;
    }
}
```

Since it is not known of 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).

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