<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/95643>95643</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm/lib/AsmParser/LLParser.cpp: 2 * pointless copy ?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            code-quality,
            llvm:asmparser
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dcb314
      </td>
    </tr>
</table>

<pre>
    Static analyser cppcheck says:

1.

llvm/lib/AsmParser/LLParser.cpp:5173:47: performance: Function parameter 'Bound' should be passed by const reference. [passedByValue]

Source code is

  auto convToMetadata = [&](MDSignedOrMDField Bound) -> Metadata * {

2.

llvm/lib/AsmParser/LLParser.cpp:5205:47: performance: Function parameter 'Bound' should be passed by const reference. [passedByValue]

Duplicate.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEk7-O2zAMxp-GXoQzZMp_4sGDU9fTHVrgiu60xCRqFcuV5AP89oVzAS7dii5dBBGEPn78kaIY7Xlm7qA6QjVktKaLD53RkyrKbPJm614TJasFzeS2yEHoZdEX1j9FpC2C6kEOIO9nkT9Gzr1dAUdnJ8Cxj9evFCIHwPH5-f2a62UB1VdFo0D1ZQOqFwuHkw9XmjXv4bjOOlk_i4UCXTlxEIDN0a-zAWxEvPjVGTGxWChGNmLahPZzTCLwiQPPmnMB1fE9e9y-k1sZquHR5qtfg2ahvWFh42NGCFqT3wXfvvkXTmQokQA17JKA9S6Eh5fhdWdovoSXYbTsjLjba8UTqM_i4yH2AprjYwX8N2Aoq_8IbFgXZzUl_sN8ZjplWtVSxl3RFIdS1QfZZJduqlWrGiwP1MqqJnOoUZ1kTQarQtKhzmyHEktZF5VslMImryvZSHNS2JZtQe0EpeQrWZfvgHIfzpmNceWurepSZY4mdvG2wYj7FJ9-reRs2gAR8BMg3riqnuJ1uRPFfdlDtyeepvUcoZTOxhQ_KiSbHHd_OxGBt-ku3s7JcYxC-2UToMZsDa67pLTcvgqOgOPZpss65drflO8FdiNL8D9YJ8Dx1l4EHN87fOvwdwAAAP__XYEg7Q">