[PATCH] D97577: [clang-tidy] performance-for-range-copy: Don't trigger on implicit type conversions.

Felix Berger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 28 08:10:02 PST 2021


flx added a comment.

In D97577#2592093 <https://reviews.llvm.org/D97577#2592093>, @lebedev.ri wrote:

> It is best not to change existing tests, but add new ones.

Could elaborate on this, Roman?

In this case the tests use special auto convertible types with the intention to test that the check doesn't trigger because the loop variable needs to be constructed. But the reason they don't trigger is that the loop variable erroneously is already a reference type.

If we keep the tests as is we should rename the test functions and use different types or document that the real reason they don't trigger is that they already are const reference types, but we already have a test for that as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97577



More information about the cfe-commits mailing list