a008b0fa8b
To my surprise, this even works with homegrown smart pointers (such as SkTLazy). https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html Find and remove redundant calls to smart pointer’s .get() method. Examples: ptr.get()->Foo() ==> ptr->Foo() *ptr.get() ==> *ptr *ptr->get() ==> **ptr if (ptr.get() == nullptr) ... => if (ptr == nullptr) ... Change-Id: I8ff541e0229656b4d8e875c8053a7e6138302547 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310976 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
24 lines
748 B
YAML
24 lines
748 B
YAML
Checks: >
|
|
-*,
|
|
bugprone-argument-comment,
|
|
bugprone-bool-pointer-implicit-conversion,
|
|
bugprone-suspicious-string-compare,
|
|
bugprone-undelegated-constructor,
|
|
bugprone-unused-raii,
|
|
bugprone-use-after-move,
|
|
google-build-namespaces,
|
|
llvm-namespace-comment,
|
|
misc-definitions-in-headers,
|
|
modernize-make-unique,
|
|
modernize-use-nullptr,
|
|
modernize-use-override,
|
|
performance-for-range-copy,
|
|
performance-unnecessary-copy-initialization,
|
|
readability-const-return-type,
|
|
readability-redundant-preprocessor,
|
|
readability-redundant-smartptr-get,
|
|
readability-static-accessed-through-instance
|
|
CheckOptions:
|
|
- key: llvm-namespace-comment.SpacesBeforeComments
|
|
value: 2
|