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.18.32~16^2~4 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1f06229c7ef2a7cf92a4aaaffd30d794622fd12f;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). (cherry picked from commit 3873b0c279b782fbbb7b7e544fc4151624610385) --- diff --git a/.clang-format b/.clang-format index 41a90bf5bb0..9381b501f1f 100644 --- a/.clang-format +++ b/.clang-format @@ -76,3 +76,4 @@ PenaltyBreakString: 80 PenaltyExcessCharacter: 100 Standard: Cpp11 ContinuationIndentWidth: 8 +RemoveParentheses: ReturnStatement diff --git a/.clang-format.headers b/.clang-format.headers index 1306bb21489..4043abbd462 100644 --- a/.clang-format.headers +++ b/.clang-format.headers @@ -64,3 +64,4 @@ PenaltyBreakString: 80 PenaltyExcessCharacter: 100 Standard: Cpp11 ContinuationIndentWidth: 8 +RemoveParentheses: ReturnStatement