<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91195>91195</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
bolt/include/bolt/Passes/StokeInfo.h: 2 * clumsy declaration of Range variable
</td>
</tr>
<tr>
<th>Labels</th>
<td>
BOLT
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
1.
bolt/include/bolt/Passes/StokeInfo.h:90:24: performance: Range variable 'S' should be declared as const reference. [iterateByValue]
Source code is
for (std::string S : DefIn)
Outfile << "%" << S << " ";
2.
bolt/include/bolt/Passes/StokeInfo.h:93:24: performance: Range variable 'S' should be declared as const reference. [iterateByValue]
Duplicate.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEk0-L2zwQxj_N-DKssUd2HB98SDYEFl7Yl6b0PpbGsbqKFfRnId--OKQ09FZ6qA8WMyNpnucniWO050VkgHYP7aHgnGYfBqNHVTfF6M1tOCVOViMv7G5RAurrVc-iPzDyLYLaQXWA6vGvy-do9C4BHe2iXTYCdHwk_ucYJQIdT8l_yNsy-XIGtesrUDtqQO3wKmHy4cKLljX8wstZ8JOD5dEJAnUnoA7j7LMzOAoa0Y6DGOSI2i8xYZBJgixaSoR2b5METrK_fWOXBdrDs8yTz0ELam8EbXyu4P2bfECgbUxmdat2MQW7nPGEq7SDTG8LUP-8APE9p8muStUrqFcEIqAWiH4mTk-Ve1Xtn_vSX2FU_wbjIV-d1ZzkIb4wgzK96rmQoe7qpu-3atsV88CdaZup67eKW80ti4yj2m6oN6rp9NgXdqCKmqqtNjXRhrqyIaNFNFNDW-mMhqaSC1tXOvd5KX04FzbGLENf131bOB7FxfuNJtq___d1BdweijCs01_GfI7QVM7GFH9tkGxyMvwhalwPb4fa5Uu8Pehxsn5BP_1Gu8jBDXNK1_uToSPQ8WzTnMdS-wvQcRXyGF6uwX8XfRey2lr73p39CAAA__937x6R">