Skip to content

AllowShortFunctionsOnASingleLine: InlineOnly and ColumnLimit: 0 behaves weirdly. #69917

Open
@tru

Description

@tru

This code:

class A {
  int GetVal1() const { return m_Val1; }
  int GetVal2() const { return m_Val2; }
};

Change the .clang-format to this:

AllowShortFunctionsOnASingleLine: InlineOnly
ColumnLimit: 0

and the result is:

class A {
  int GetVal1() const { return m_Val1; }
  int GetVal2() const {
    return m_Val2;
  }
};

If you set ColumnLimit: 120 it will reproduce the expected first result.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions