Skip to content

[clang-format] Incorrect formatting when expression has template like comparison operators #65877

Closed
@paperchalice

Description

@paperchalice

Consider following code snippet:

void test(int i, int *j) {
  bool b = *j < *j && *j > *j;
  bool c = i < i && i > i;
  i < i && i > i;
}

clang-format will give:

void test(int i, int *j) {
  bool b = *j<*j && * j> * j;
  bool c = i < i && i > i;
  i<i && i> i;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions