[PATCH] D157129: [NFC] Fix unnecessary copy with auto.

Srividya Sundaram via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 15:43:28 PDT 2023


srividya-sundaram added a comment.

In D157129#4564766 <https://reviews.llvm.org/D157129#4564766>, @steakhal wrote:

> I went over the patch and I found only a single debatable case for taking by reference.
> To clarify why I would prefer taking by value: value semantics is good for local reasoning; thus improves maintainability. We should only deviate from that when there is actual benefit for doing so.
> Static analysis tools, such as Coverity, have false-positives. Some rules are better than others.
> As a static analysis tool developer myself, I'd recommend carefully evaluating the findings before taking action for resolving them.
> And if you find anything interesting, tool vendors are generally happy to receive feedback about their tool. I guess, they should as well understand that taking a pointer by reference doesn't improve anything.

Thank you, @steakhal for the detailed feedback.
Based on your comments, and after discussing with @tahonermann, I am abandoning this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157129/new/

https://reviews.llvm.org/D157129



More information about the cfe-commits mailing list