commit | 31954bf23f2435684a9d797a2d99c7cad2122d35 | [log] [tgz] |
---|---|---|
author | John Stiles <johnstiles@google.com> | Fri Aug 07 17:35:54 2020 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Fri Aug 07 22:20:36 2020 +0000 |
tree | 8153474207e1b8142a1129add0285353c0b93963 | |
parent | e0dd3df0934a288c4f1a573c353ace5e48ec4bfd [diff] |
Enable ClangTidy check performance-unnecessary-copy-initialization. https://clang.llvm.org/extra/clang-tidy/checks/performance-unnecessary-copy-initialization.html Finds local variable declarations that are initialized using the copy constructor of a non-trivially-copyable type but it would suffice to obtain a const reference. The check is only applied if it is safe to replace the copy by a const reference. This is the case when the variable is const qualified or when it is only used as a const, i.e. only const methods or operators are invoked on it, or it is used as const reference or value argument in constructors or function calls. Change-Id: I1261410deccd8ea64e85edec53fbd5360940e587 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308759 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Mike Klein <mtklein@google.com>