From 1f06229c7ef2a7cf92a4aaaffd30d794622fd12f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 19 Nov 2024 10:35:40 +0100 Subject: [PATCH] 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) --- .clang-format | 1 + .clang-format.headers | 1 + 2 files changed, 2 insertions(+) diff --git a/.clang-format b/.clang-format index 41a90bf5bb..9381b501f1 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 1306bb2148..4043abbd46 100644 --- a/.clang-format.headers +++ b/.clang-format.headers @@ -64,3 +64,4 @@ PenaltyBreakString: 80 PenaltyExcessCharacter: 100 Standard: Cpp11 ContinuationIndentWidth: 8 +RemoveParentheses: ReturnStatement