From 1fdc2d76f32c166b96787fe197b6ca188ef07aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 19 Nov 2024 10:39:47 +0100 Subject: [PATCH] Add new clang-format option to remove redundant semicolons The new clang-format options (since clang-format 16) removes semicolons after the closing braces of functions and constructors/destructors. (cherry picked from commit c7420eccd9b169dd0fd8864f192373a3390988af) --- .clang-format | 1 + .clang-format.headers | 1 + 2 files changed, 2 insertions(+) diff --git a/.clang-format b/.clang-format index 5d6deb9871..7bd90052ab 100644 --- a/.clang-format +++ b/.clang-format @@ -80,3 +80,4 @@ 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 +RemoveSemicolon: true diff --git a/.clang-format.headers b/.clang-format.headers index 0f8ff5ac80..f5a5bae64e 100644 --- a/.clang-format.headers +++ b/.clang-format.headers @@ -79,3 +79,4 @@ PenaltyExcessCharacter: 100 Standard: Cpp11 ContinuationIndentWidth: 8 RemoveParentheses: ReturnStatement +RemoveSemicolon: true