Skip to content

Option to customize indentation of consturctor initilializers #141169

@EugeneZelenko

Description

@EugeneZelenko

It'll be great to have option that allow to customize indentation between colon/comma and initializer in constructor. It looks like currently single space is hardcoded.

For example:

#include <string>

class Test
{
public:
    Test(int int_argument, const std::string& string_argument);

private:
    int         int_argument_;
    std::string string_argument_;
};

Test::Test(int int_argument, const std::string& string_argument)
:   int_argument_(int_argument)
,   string_argument_(string_argument)
{
}

Basically, it's necessary to make this indentation follow IndentWidth (4 in this example).

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions