clang-format BraceWrapping.AfterCaseLabel to true

Message ID 20241204110507.430098-1-mmalcomson@nvidia.com
State New
Headers
Series clang-format BraceWrapping.AfterCaseLabel to true |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed

Commit Message

Matthew Malcomson Dec. 4, 2024, 11:05 a.m. UTC
  From: Matthew Malcomson <mmalcomson@nvidia.com>

This setting seems to better match the indentation that is used in GCC.

Adds an exra level of indentation after braces in a case statement.

Only manual testing done on the switch statements in
c-common.cc:resolve_overloaded_builtin and
alias.cc:record_component_aliases.

Ok for trunk?

contrib/ChangeLog:

	* clang-format: Set BraceWrapping.AfterCaseLabel.

Signed-off-by: Matthew Malcomson <mmalcomson@nvidia.com>
---
 contrib/clang-format | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/contrib/clang-format b/contrib/clang-format
index f4f708648eb..95f1455c14d 100644
--- a/contrib/clang-format
+++ b/contrib/clang-format
@@ -32,6 +32,7 @@  BinPackArguments: true
 BinPackParameters: true
 BraceWrapping:
   AfterClass: true
+  AfterCaseLabel: true
   AfterControlStatement: true
   AfterEnum: true
   AfterFunction: true