Enable ClangTidy flag modernize-use-override.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
Adds override (introduced in C++11) to overridden virtual functions and
removes virtual from those functions as it is not required.
virtual on non base class implementations was used to help indicate to
the user that a function was virtual. C++ compilers did not use the
presence of this to signify an overridden function.
Change-Id: If66d8919358f72a4035190caf8d7569268037a9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310160
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/.clang-tidy b/.clang-tidy
index 5160dd6..7c4b363 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,4 +1,20 @@
-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'
+Checks: >
+ -*,
+ bugprone-argument-comment,
+ bugprone-bool-pointer-implicit-conversion,
+ 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-override,
+ performance-for-range-copy,
+ performance-unnecessary-copy-initialization,
+ readability-const-return-type,
+ readability-redundant-preprocessor,
+ readability-static-accessed-through-instance
CheckOptions:
- key: llvm-namespace-comment.SpacesBeforeComments
value: 2