Skip to content

unexpected formatting on empty lines #138942

Open
@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

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions