[clang-tidy] performance-for-range-copy: Don't trigger on implicit type conversions.
authorFelix Berger <flx@google.com>
Fri, 26 Feb 2021 21:27:06 +0000 (16:27 -0500)
committerFelix Berger <flx@google.com>
Wed, 3 Mar 2021 01:02:48 +0000 (20:02 -0500)
commita189b3b9e8bb398d9fe8770956f8ad1d58c2a214
treeb2abade19168f39a0631bbc933fe91092d90068b
parentb3ac90da1df490fb8ca5280f9dfb40d26f5a9c40
[clang-tidy] performance-for-range-copy: Don't trigger on implicit type conversions.

This disables the check for false positive cases where implicit type conversion
through either an implicit single argument constructor or a member conversion
operator is triggered when constructing the loop variable.

Fix the test cases that meant to cover these cases.

Differential Revision: https://reviews.llvm.org/D97577

Reviewed-by: hokein
clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/performance-for-range-copy.cpp