From e9804268c770239a8d19107d3bba7078f52af938 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 29 Oct 2020 16:48:51 -0400 Subject: [PATCH] Update to clang-tidy-11 --- .clang-format | 5 ++++- contrib/utilities/indent_common.sh | 2 +- examples/.clang-format | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.clang-format b/.clang-format index 0e12ac2e3b..795ee2c028 100644 --- a/.clang-format +++ b/.clang-format @@ -26,8 +26,9 @@ BinPackArguments: false BinPackParameters: false BraceWrapping: + AfterCaseLabel: true AfterClass: true - AfterControlStatement: true + AfterControlStatement: Always AfterEnum: true AfterExternBlock: true AfterFunction: true @@ -36,6 +37,8 @@ BraceWrapping: AfterUnion: true BeforeCatch: true BeforeElse: true + BeforeLambdaBody: false + BeforeWhile: true IndentBraces: true SplitEmptyFunction: false SplitEmptyRecord: false diff --git a/contrib/utilities/indent_common.sh b/contrib/utilities/indent_common.sh index edbede9729..f74c39697b 100644 --- a/contrib/utilities/indent_common.sh +++ b/contrib/utilities/indent_common.sh @@ -57,7 +57,7 @@ checks() { CLANG_FORMAT_MAJOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*\([0-9]*\).*$/\1/g') CLANG_FORMAT_MINOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*[0-9]*\.\([0-9]*\).*$/\1/g') - if [ "${CLANG_FORMAT_MAJOR_VERSION}" -ne 6 ] || [ "${CLANG_FORMAT_MINOR_VERSION}" -ne 0 ]; then + if [ "${CLANG_FORMAT_MAJOR_VERSION}" -ne 11 ] || [ "${CLANG_FORMAT_MINOR_VERSION}" -ne 0 ]; then echo "*** This indent script requires clang-format version 6.0," echo "*** but version ${CLANG_FORMAT_MAJOR_VERSION}.${CLANG_FORMAT_MINOR_VERSION} was found instead." echo "***" diff --git a/examples/.clang-format b/examples/.clang-format index 546f0be370..a640fbdc74 100644 --- a/examples/.clang-format +++ b/examples/.clang-format @@ -28,8 +28,9 @@ BinPackArguments: false BinPackParameters: false BraceWrapping: + AfterCaseLabel: true AfterClass: true - AfterControlStatement: true + AfterControlStatement: Always AfterEnum: true AfterExternBlock: true AfterFunction: true @@ -38,6 +39,8 @@ BraceWrapping: AfterUnion: true BeforeCatch: true BeforeElse: true + BeforeLambdaBody: false + BeforeWhile: true IndentBraces: true SplitEmptyFunction: false SplitEmptyRecord: false -- 2.39.5