skia2/.clang-tidy
John Stiles bfbe71252a Enable ClangTidy check performance-for-range-copy.
This will prevent us from writing range-based for loops that copy the
loop variable when a const& would suffice.

https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html
-----
Finds C++11 for ranges where the loop variable is copied in each
iteration but it would suffice to obtain it by const reference.

The check is only applied to loop variables of types that are expensive
to copy which means they are not trivially copyable or have a
non-trivial copy constructor or destructor.

Change-Id: Ic26bff7e9c48b4d1a9ad9c0606199920ea7a0af8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306945
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-31 01:42:51 +00:00

2 lines
168 B
YAML

Checks: '-*,bugprone-use-after-move,bugprone-unused-raii,bugprone-undelegated-constructor,bugprone-argument-comment,performance-for-range-copy,google-build-namespaces'