Skip to content

[clang-format] binary expression is reformatted as pointer declaration #157356

@isuckatcs

Description

@isuckatcs
int A = 1, B = 2;

int main() {
  A * B;

  return 0;
}

In the snippet above clang-format would reformat the A * B expression as A *B, which visually implies a pointer declaration.

See the example on godbolt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions