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

    <tr>
        <th>Summary</th>
        <td>
            `modernize-use-designated-initializers` reported for pre-C++20 code
        </td>
    </tr>

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

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

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

<pre>
    ```cpp
struct S
{
    int i1;
 int i2;
};

void f()
{
    S s{0};
}
```

Running with `-std=c++11` produces the following warning:
```
<source>:9:8: warning: use designated initializer list to initialize 'S' [modernize-use-designated-initializers]
    9 |     S s{0};
      | ^~~
      |         .i1=
<source>:1:1: note: aggregate type is defined here
    1 | struct S
      | ^
```

https://godbolt.org/z/EzerEWsKh

Designated initializers are not available until C++20: https://en.cppreference.com/w/cpp/language/aggregate_initialization.

CC @SimplyDanny @PiotrZSL 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVE-P-jYQ_TSTywjkjCGBQw5ANpf2UJVDpV4qEw_BlbEj21m0e_h99srZP7A_basiEnsmeW9m3kysYjSDY25gvYd1W6gpXXxozibwTT1zcfL6pYFKvP37cQTRgtjFFKY-4fHNgnr_tkFENC6hKUF-uGabPm2o2_t-vj97o_EMtAHafsN3xAj1XnzB1e375iOxR77fJ-eMG_Bm0gWhEouYNMi2B9oD7csSKoFj8HrqOWK6MJ69tf42Q1TIUJC77_nlIfop9AzyCeRuC3K3Abl7gOEUGTVnTVVijcaZZJQ1rxzQmpgw-QcfAtVHoBphvb96zcGZV15MkRd3isUDRYR1exdmi1Af8F8kmv3zC7B--vHjZ-fHb5k71X5bXfl-ofOJ86qGIfCgEmN6GRlNRM1n41jjhQPfI5RzhK8T8iWd_-jdJaUxZvmpA-oGr0_epqUPA1D3CtQ9vXJ4-iP-cnkEtd_qHVEFzsmjelbGqpNlnFwyFg9vk0AiV_U1IrtlP46BzxzY9bzs_RWouwF1efSps8oNkxoYqPuU46_PoCoZ75aPqR0OCCtxNNfRvrTKuZds_mZ8Cn8ef8VCN1Jv5VYV3JS12K429VqUxaXRSp5WQhJtzluu9UpV2-pcCS5pVanNSRemIUErIYUsa7mhctkrErrcVJrWVb0mASvBV2Xs0trnaxawMDFO3GxkLamw6sQ2zt88keMbzg-BKB8BocmYxWkaIqxEntp4Z0kmWc4Hwv-b10pg4NGH3JuzDzgGXnzKj73XXEzBNj-13aTLdHrXPkd-XxZj8H9zn4C6Od8I1M31_BMAAP__jjxl0w">