Skip to content

[clang-format] breaks C++ code (adds space around "->") #119889

@plata

Description

@plata

since clang 18

A::A()
    : B()
{
    Q_EMIT bar::instance()->exec();
}

formatted to:

A::A()
    : B()
{
    Q_EMIT bar::instance() -> exec();
}

This happens with any default style or even

---
IndentWidth: 4
---

original issue: https://invent.kde.org/frameworks/extra-cmake-modules/-/issues/15

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatobsoleteIssues with old (unsupported) versions of LLVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions