llvm / llvm/llvm-project

[clang-format] AllowShortEnumsOnASingleLine not honored when enum has trailing comma

Open
#179,728 1 comment 0 reactions 0 assignees View on GitHub
clang-format
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Short C enumeration are split into multiple lines, despite AllowShortEnumsOnASingleLine being set to true, when enum has trailing comma.

Example:

enum test {
A,
B,
C,
};

should be transformed to

enum test { A, B, C, };

clang-format version 23.0.0git (https://github.com/llvm/llvm-project.git 91c4decc01522c0130d47f8270330194259f4207)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.