<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/90285>90285</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:298: Poor choice of range variable type ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend,
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:
clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:298:19: performance: Range variable 'Name' should be declared as const reference. [iterateByValue]
Source code is
for (auto Name : Symbol.Names) {
Suggest code rework.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyskk-PmzAQxT-NuViLYBxCOHBINkLqpaoaqfexPYC7xqb-k4pvX5H0z-69HLDGT3rz9H7GGM3kiHrWXFhzLTCn2YdeKynqQyG93vpbwmQUR4d2ixS4Wlc1k3rjEbfIxJlVV1b9_iuLbmIwWCMZDEPwLpHTDIZPLlEYUdEtZTlkp5LxLr56F_NCoVTrysQZuhMT57pj4sxXCqMPCzpF-_gV3UT8jsGgtMQZtJ9xIQYtj7PPVnNJXJOyGEhzjFx5FxMPNFIgp6jkrLmYRAETXbZvaDOx5vo--c3noIgrr4mb-F7hz2_0gTM4YU6e77v5Huu2LdLbcp8jg46z9vLBNE8TxfR0DfTTh7fyqRS6F7oTHRbU1219qNuqbUQx97I9kVCnRjSEWupjJdrmKGs6jifEppaF6aGCQ3WAI4AAIcpKaNGJtoOGCAiIHSpa0NjS2vtS-jAVJsZMfVfBqSksSrLxgRvgiUucx7-ggMHrLnhNLz8yWpO2_bK5FqHf_V5kniI7VNbEFP9tSCZZ6v8Hff7F-8DV7I0i7kcePoJP27o3PxQ52H5OaX28QBgYDJNJc5al8ssewd7_HC9r8N9JJQbDo4jIYHh08SsAAP__zjTzbw">