Skip to content

[clang-format] More control of wrapped lambda brace indentation #143248

@rmarker

Description

@rmarker

Recently, in #135479, the IndentBraces option was extended to apply to wrapped lambda braces.
It would be good to be able to control the indentation separately from the other braces to be able to maintain the previous behaviour.

Also, in my ever continuing quest to convince the various projects at work to adopt clang-format, it would be helpful to be able to independently control this indentation for nested and unnested lambdas.

For example:

auto foo = [] ()
  {
    return true;
  };

function(
    [] ()
    {
      return true;
    });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions