Skip to content

[clang-format] unexpected formatting on empty lines #138942

@kadircet

Description

@kadircet

command clang-format --lines=2:2 a.cc

actual formatting:

void f() {
  
}

expected formatting:

void f() {}

this seems to be WAI if there are tokens on line 2, e.g:

void f() {
  return;
}

gets formatted as void f() { return; }.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions