Skip to content

clang-format: IntegerLiteralSeparator formatted incorrectly with s literal suffix #62679

@vogelsgesang

Description

@vogelsgesang

WIth the configuration

IntegerLiteralSeparator:
  Binary: 8
  Decimal: 3
  DecimalMinDigits: 5
  Hex: 0

Clang-Format 16.0.3 proposes the following change:

-   RateLimit limit{2, 1000s};
+   RateLimit limit{2, 10'00s};

There are two issues:

  1. it seems to consider the s suffix as a digit, and hence place the tick in the wrong place
  2. it should not format this number at all, thanks to DecimalMinDigits

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions