<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56768>56768</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [coroutine] Clang gives incorrect warnings
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          debashish-ghosh
      </td>
    </tr>
</table>

<pre>
    In the following code snippet:
```cpp
#include <coroutine>
struct coro {
  struct promise_type {
    coro get_return_object();
    constexpr auto initial_suspend() { return std::suspend_never{}; }
    constexpr auto final_suspend() noexcept { return std::suspend_always{}; }
    void unhandled_exception();
    void return_void();
  };
};
coro c(int i) {
  co_await (i = 0, std::suspend_always{});
}
```
clang gives a weird warning:
```
warning: multiple unsequenced modifications to 'i' [-Wunsequenced]
  co_await (i = 1, std::suspend_always());
              ^
1 warning generated.
```

Another example can be found [here](https://godbolt.org/z/vMnc77Er6).

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFU02ToyAQ_TV4oSZlIAY9eMhMZqr2sOc9WgitskXABUxm9tcvRDPJzqeFCnTT_d6ju7Xypf5hcBgAd1Zre1Kmx8JKwN6ocYSA6A7le5Tv0DafhxjHZYdQZYSeojOiD8I6OwVlANHH2e6Dm0TAyYARu583MV62R2cPykMTXka4NeP5QA-hcRAmZxrb_gYRECkRqRD9z9H4AM-jw3wKFiujguK68ZMfwcj5QAqN50Axs0x06G7xaAwcwaXcbB8D4_T7LHinzLvQxsKzgDF8mYPrE3_xnyQ5WiXxZAZupAbZzOGUNR-QPbsuiqT5O5c5_nI1N_OznCK6KxOwWiS5HBK24SeuIoVoj9e4xzkiD9-wuEn7yua1PJakmsdC6tURPOb4BMpJfOLOxPJ6X1Hz8mrGh0kHNWqI0nj4M4ERIPHBStUpwZM-HscrQYRFOgyj4v7u140nKvaf01t_RW-W9I3w1wcVS2WvL1ximRpwPIBcfchp_u6MjQ3mMDzzQ2IluMFtarjJyIQ-2iCBJuUQwugTNPIUR29la3VYWdfH1d_4Hn8awdij20aQS8YM6vW2KCtGaJFnsqayohXPggoa6hj82pfFHj_cXEvsXetc7KwLGZ9NTtdvIKgwTO1K2ENcaH28_O5i-85d-aS8nyBq91Rs2bbMhrqtZMU66DasLYsOypaVpF0zTnOxYVDSTPMWtE_gECEGTvgcIs4jxEzVJCckZ6TM17TKq9WGVqyi6xbKnHLZSbTJ4cCVXiUcSZvM1WdI7dT7aNTKB381cu9Vb-CsRYofu3mwrpbQcj8oP9z1g_VDdoZQnyn8A9x5ilU">