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

    <tr>
        <th>Summary</th>
        <td>
            [clang] Using std::complex suppresses warnings from -Whigher-precision-for-complex-division
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:diagnostics,
            false-negative
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          Maetveis
      </td>
    </tr>
</table>

<pre>
    The `-Whigher-precision-for-complex-division` emitted when `-fcomplex-arithmetic=promoted` option is used and the target does not support a higher precison type is not emitted:
- for C++ `std::complex` divisions (instead of C `_Complex`)
- when including `<complex>` from libstdc++ (after https://github.com/llvm/llvm-project/pull/131477)
- when including `<complex>` from libc++ and instantiating the templated std::complex division. ([Compiler explorer link](https://godbolt.org/z/EenxbcKdP))

libstdc++ does not suppress the warning before https://github.com/llvm/llvm-project/pull/131477 because its using `/=` which is fixed by https://github.com/llvm/llvm-project/pull/131477
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyklD2PpDgQhn-NSSxaYKC7CQj6Y0hOJ11wpwtPxi6gbo2N7KKnZ3_9yvQwq5lNdnciJFMfbz1v2TIEHCxAw6ozq66JXGh0vvlTAt0AQ9I5_dL8PQJn-yz9d8RhBJ_OHhQGdDbtnU-Vm2YD91TjbT1k-4zDhESg-fMIdk3ttyjpkcYJCBUrrrN3kyPQMcXNhM5yDHwJoLm0mtMInKQfgLh2ELh1xMMyz84Tl_whhj_EOMvpZYaYHqNe-7PixLJTynvn-YWJMxPnqCbQ-qc4vYqK7Tf1gTNxRBsIpOau55eY8N_lLZCJei25ToZWmUWjHWIQKy5bveIpluy9m7jBLpBWW3NxlD2B5yPRHKII0TLRDkjj0u2Um5hojbltn3T27n9QxEQ7L8Yw0eZFXh4OvyFiUxC5xvGkJZQUs1bKMM1GRsc-snkDs4viWXWOKNCA53CfjfPguUH7hVVXJo4fpnK6c4Z2zg9MtF-ZaJ_A3jv1h_4rDrDOwLLTe0LvjPYQwqrvWXobtXbQOw-fpMc7UHIJwJHism3kRMuKa0T2PKIa4yb1eAfNu5dP9kt0U-i6qGUCTX4oy7zO9lWVjE2tVCn23UEdjnUv9rqs-0xXxyLX-0MpcpVgIzJRZWVWZ7Uo82pXHmtRap1JpUDVZc7KDCaJZhf7R9AJhrBAkxdlfcwSIzswYb3bQigj7cCKk0Y5WBcIVWBCMHFhQvTSBEgtDJLwBvG4uia-WafqliGwMjMYKHzvQ0hmfTUeZasr_2cl-cP-bD5C2FwMj6X8yeckWbxpftmAFUNYLVhJ3BrxLQAA__-y0pxp">