31954bf23f
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>
5 lines
539 B
YAML
5 lines
539 B
YAML
Checks: '-*,bugprone-use-after-move,bugprone-unused-raii,bugprone-undelegated-constructor,bugprone-argument-comment,bugprone-bool-pointer-implicit-conversion,performance-unnecessary-copy-initialization,performance-for-range-copy,readability-redundant-preprocessor,misc-definitions-in-headers,modernize-make-unique,llvm-namespace-comment,readability-static-accessed-through-instance,readability-const-return-type,google-build-namespaces'
|
|
CheckOptions:
|
|
- key: llvm-namespace-comment.SpacesBeforeComments
|
|
value: 2
|