From bd054d90c9f5b3fa6362918a57ba9d0f3b08d858 Mon Sep 17 00:00:00 2001 From: yah01 Date: Sun, 19 Mar 2023 17:37:55 +0800 Subject: [PATCH] Update .clang-tidy to find more performance issues (#22836) Signed-off-by: yah01 --- .clang-tidy | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 5488f26a82447..0de4398ce51d7 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -20,13 +20,14 @@ Checks: > -*, clang-diagnostic-*, -clang-diagnostic-error, clang-analyzer-*, -clang-analyzer-alpha*, google-*, -google-runtime-references, -google-readability-todo, - modernize-*, -modernize-pass-by-value, -modernize-use-equals-default, -modernize-use-trailing-return-type, - performance-faster-string-find, performance-for-range-copy, - performance-implicit-conversion-in-loop, performance-inefficient-algorithm, - performance-trivially-destructible, performance-inefficient-vector-operation, - performance-move-const-arg, performance-move-constructor-init, - performance-noexcept-move-constructor, performance-no-automatic-move, - performance-type-promotion-in-math-fn + modernize-*, -modernize-use-trailing-return-type, + performance-*, + bugprone-bool-pointer-implicit-conversion, + bugprone-branch-clone, + bugprone-dangling-handle, + bugprone-exception-escape, + bugprone-inaccurate-erase, + # produce HeaderFilterRegex from core/build-support/lint_exclusions.txt with: # echo -n '^?!('; sed -e 's/*/\.*/g' core/build-support/lint_exclusions.txt | tr '\n' '|'; echo ')$' @@ -36,7 +37,7 @@ CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines value: '1' - key: google-readability-function-size.StatementThreshold - value: '800' + value: '200' - key: google-readability-namespace-comments.ShortNamespaceLines value: '10' - key: google-readability-namespace-comments.SpacesBeforeComments