Skip to content

clang-format removes space between 'override' and curly brace when there's a trailing semicolon #57305

Closed
@zmodem

Description

@zmodem

Consider:

$ echo 'struct S { void f() override {}; };' | clang-format -style=chromium
struct S {
  void f() override{};
};

Note the missing space between override and {.

This only seems to happen when there's a trailing semicolon --- which is of course unnecessary and -Wextra-semi warns about it --- but it would be nice if clang-format could handle it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions