Skip to content

clang-format produces unnecessary spacing around template angle brackets for class member function calls. #123144

@alanzhao1

Description

@alanzhao1

Given

int foo() {
  return bar()->baz<1 | 2>(1);
}

clang-format returns

int foo() { return bar()->baz < 1 | 2 > (1); }

which has unnecessary spacing around the two angle brackets.

Things that are required to trigger this issue:

  • Certain operators in the template parameter list trigger this issue (e.g. |, &&, and & work, but + doesn't)
  • The return statement is required.
  • There must be a parameter in the method call.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions