<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94375>94375</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/utils/TableGen/NeonEmitter.cpp:1058: pointless string copy ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
tablegen,
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/utils/TableGen/NeonEmitter.cpp:1058:47: performance: Function parameter 'Name' should be passed by const reference. [passedByValue]
Source code is
std::string Intrinsic::mangleName(std::string Name, ClassKind LocalCK) const {
Maybe better code:
std::string Intrinsic::mangleName( const std::string & Name, ClassKind LocalCK) const {
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycUstu2zoQ_ZrRhoghkZQlLbTw4-qiSJtNiu75mMhsKVLlUAH094VsAw28SzcccIac88BRRG4MiD3UR6jPhVryJabeGi0qWeho1_41q-wMU0H5lTAxM8_mguYXI7USiAOUZyjvp_EqjMCHJTtPwIfvSnv8HwPw4QVj-G9yOWPamXkGcajKugVxkA2IA5sxvcU0qWBwuw5LMNnFwGaV1IQZEwPevKgJgTeMLnHxlmlksyJCy_TKTAyUWcI3TBgM7hjUx9v0uP5QfkGozx-pvsYlGWQmWmSOPk4o202WOFBOLozsS9gqOXPrTiqMHm9U2se3t_aJnbwienbBsq_RKH96Bt7dKUJz_Ij2Ta0amcbNmCubB0s_w-aO8PgF-P5TxArbC9uJThXYV03V1FXL66a49FUjq25fcdlpLBuj2la0dVe2rZaq1Y0uXM9LLst9Kas9l9V-J4Wsyqrt3qywWmsLssRJOb_z_n3axTQWjmjBvpOiqQuvNHq6ZpHzvGVn3LLDgZ-A882cp9-L8i6vW7M-F6nf9jzpZSSQpXeU6e_m7LLH_l8iyeboQvZIxO4WmjivDMRQLMn3l5zna_L5AHwYXb4semfiBHzYwO_laU7xJ5oMfLhq3MBvMt97_icAAP__qFYXRw">