From: Ondřej Surý Date: Tue, 19 Nov 2024 09:35:40 +0000 (+0100) Subject: Add new clang-format option to remove redundant parentheses X-Git-Tag: v9.21.3~33^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3873b0c279b782fbbb7b7e544fc4151624610385;p=thirdparty%2Fbind9.git Add new clang-format option to remove redundant parentheses The new clang-format option (since 17) can remove redundant parentheses in the return statement (with configuration value ReturnStatement). --- diff --git a/.clang-format b/.clang-format index 54a39fdb4d4..5d6deb9871d 100644 --- a/.clang-format +++ b/.clang-format @@ -79,3 +79,4 @@ PenaltyExcessCharacter: 100 Standard: Cpp11 ContinuationIndentWidth: 8 ForEachMacros: [ 'cds_lfs_for_each', 'cds_lfs_for_each_safe', 'cds_list_for_each_entry_safe', 'ISC_LIST_FOREACH', 'ISC_LIST_FOREACH_SAFE', 'ISC_LIST_FOREACH_REV', 'ISC_LIST_FOREACH_REV_SAFE' ] +RemoveParentheses: ReturnStatement diff --git a/.clang-format.headers b/.clang-format.headers index 4b4d091fa28..0f8ff5ac80c 100644 --- a/.clang-format.headers +++ b/.clang-format.headers @@ -78,3 +78,4 @@ PenaltyBreakString: 80 PenaltyExcessCharacter: 100 Standard: Cpp11 ContinuationIndentWidth: 8 +RemoveParentheses: ReturnStatement