<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94933>94933</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:64: Pointless copy ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
tools:llvm-dwarfdump,
code-quality,
llvm-dwarfutil
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:64:43: performance: Function parameter 'V' should be passed by const reference. [passedByValue]
Source code is
DWARFFormValue(dwarf::Form F, ValueType V) : Form(F), Value(V) {}
Suggest new code:
DWARFFormValue(dwarf::Form F, const ValueType & V) : Form(F), Value(V) {}
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk0uPnDoQhX9NsSlNy9g8Fyy6p4V0d1d3riZrYwpwYjDxY0b8-wh6Mj2TVaJseJwqq746Opbe63EhaiC_QH5NZAyTdU2vOpFmSWf7rXkKMmiFcpFm8-RQrauaSH1DLzcP4gzsCuztaczLDLzVizKxJ-Dtm3ClLo7_LIPdv7-c_2t_vlvr5mdpIp0mEOciA3HOBIgzruQG62a5KNp_27iooO2Cq3RypkAOgZfPwEv0k42mx45wld5Tj92Gyi4-oKOBHC2KTgj55Va9bMc4yK8fuZ9sdIpQ2Z5Q-48VxM-cwKv-VbphX1ycdxlb4I94FP_fVsJn4DUezNbNwKsWeP3eAby61csLlJ8R4jiSD7jQ68Hxi7O_iXFb_A4DvPhzoKRvRF-LWibUpGVaMcbSVCRTU6Q0UF6wshw62Q1FRqmismIiVVVXqSHRDWc8Y0XKWJHmqTjVKctlUcu-HoQqqw4yRrPU5rQH42TdmGjvIzV1VguRGNmR8UcWOQ_Wmj1fe-fDsWwf5xU4B_4InO8ePXyP0uiwvYv33hi02eX8mrjmkLs4esiY0T74-_igg6HmntS_ii7-a_USDHmPyq4bgmiT6EwzhbAeV4Xvp0cdptidlJ3vUw7C1dmvpMJOsZvigbc3X14a_iMAAP__TkMelA">