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

    <tr>
        <th>Summary</th>
        <td>
            llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:201: Pointless copy of object ? 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp,
            code-quality,
            llvm:openmpirbuilder
      </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/Frontend/OpenMP/OMPIRBuilder.h:201:46: performance: Function parameter 'RHS' should be passed by const reference. [passedByValue]

Source code is

  bool operator<(const TargetRegionEntryInfo RHS) const {

Suggest new code:

  bool operator<(const TargetRegionEntryInfo & RHS) const {

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyskkGP2yAQhX_N-DLaCA-2kxx8SDa1uodVV7tV7xiPbVoCLuCt_O8rJ1F3W6mHSr0gmAd8j-GpGM3gmGsoj1CeMjWn0Ye6063Mi6z13VK_JJWMRuWUXSIH1NOkR9bfMKolgjyAOIG4jda-noEa47SdOwZqboUmeJfYdUDNp4nd49M6eXx6eD7OxnYcNiPIA4kc5KGoQB5w4tD7cFZO87psZqeT8Q4nFdSZEwcE2j5_fAHaYhz9bDtsGScVI3fYLqi9iwkD9xzYad4glMerely-KDszlKf3xl_8HDSj9h2jie8VxNZ7i37ioJIPIO-BdtfrP6swcHrmwXj3waWwPLje48XV_uYAtsffMPMwcEzo-MeF9Uf7_pkFVP2Fl3W17PZyrzKu822-E2W-E5SNdamI95IVF7kWVMhe6E73ssqrXvW9LDNTk6BCVLkgIauCNntRCNK7rqhUV0mtoRB8VsZu1s_d-DBkJsaZ630pZJVZ1bKNlzwR-YndeQIioHsgWp98931W1qTlV_ESEXm4bjWhvSZilctTFupVvmvnIUIhrIkpvmGTSZbr_5A5fPLGJcsxovbTgr5H335lnRBkg9kcbD2mNF3STg1QM5g0zu1G-_Mb72J0Cn49t_pZexKBmmtbXmv6GQAA__8OTBUn">