<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/90288>90288</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm/tools/llvm-lto2/llvm-lto2.cpp:254: Poor choice of range variable type ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm-tools,
code-quality
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
llvm/tools/llvm-lto2/llvm-lto2.cpp:254:20: performance: Range variable 'R' should be declared as const reference. [iterateByValue]
Source code is
for (std::string R : SymbolResolutions) {
Suggest code rework.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUks2O3CAQhJ8GX1pr4ca_Bx9mMvI5mpVy56dtk2WMA3gjv31k70aZPebSomlUVPEhY7TTQtSz6sqqWya3NPvQG61EUWbKm71_TTJZDXKRbo8UQK-rnkm_QZR7ZOLC-I3xz-rc-4PhkLx3keFwtC8ueXxe53pdmbhgVR6VM3GBlcLow0Mumo72LpeJ4F0GK5UjYNjcGTYQZ785A4rAkHYykAEZQfslJgg0UqBFUw6sutpEQSa67j-k24hVt2ePr34LmkB7Q2Dj8wRg9AEYtjGZI5i4xBTsMsEdDluv-0N5d6fo3ZasXyLDDlhz_SK-TRPF9KEe6LcPb_nHJDO9MJ3oZEZ90RRl0RSFwGzulWpNXRR8LOpmNGPXYM1VrUxbGJI1YWZ75FjyEmtE0VaY805ooRo5lrzmBltWcnpI6_LjjXMfpszGuFHfcWzbzElFLp6AEU8Kn3iQ4TeGeFh9-bVJZ9N-bFa3LPTnObVNkZXc2ZjiP-1kk6P-v0nDd-8D6NlbTeBHCF8hp30lYGLItuD6OaX1_Fo4MBwmm-ZN5do_PsX_3rEG_5N0YjiceQ8fZ-Q_AQAA___mt-Qz">