<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66518>66518</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ftrivial-auto-var-init adds init for some types like std::string (unnecessarily?)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jvoung
</td>
</tr>
</table>
<pre>
It seems like (some?) auto vars of type std::string can have "auto-init" even though the constructor should have initialized the variable.
Examples in https://godbolt.org/z/6Kf7bdzf8
It seems like GCC doesn't do this with their version of ftrivial-auto-var-init.
Is this intentional?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsktFunDwQhZ_G3Ix2BWZZ4IKL_MlPFfUpDB5gUmOvPANp9ukrs5HaRr2xLzxndD6fY5hp9oidqv5T1UtmNllC7N72sPk5G4L96F4FGHFlcPQDQemGw4qq7JVuwWwSYDeRIUwgHzcEFqvKJ1U-sUTyM4zGw2L2JNRp-kSeRGkNuKMHWcI2LyALwhg8S9xGCRF4CZuzD12aJ-PojvaY200kMzg8A6j8ReVPj_P_n2a9OWQgD4vIjZML3Svdz8EOwck5xFnp_q50f_0-1YO9T81D-jfgt-dnsAHZK10L2ACyEMM7yWGTIuwYmYJPxJNE2sm400G2m3jQnf_09cqPBeQFvVDwxqmyz2xX2rZsTYZdcW0vddM0RZ4t3TDW2qI19TRURWOni7FNPpR1i-Ogx6nIqNO5LvO2qIrLJS_ys66bopquU1O2tmymWl1yXA25s3P7mqAzYt6wu16rosmcGdDxkbbWHt_heFRap_BjlzSnYZtZXXJHLPx7i5A47P5NDMZaPpKCKcUXVjza8PmlXzuhdLN5jyMym0ju41GmbIuu-xIdybIN5zGsSvfJyed1usXwhqMo3R_-OYWa-H4FAAD__6ca7RA">